{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Description：\n",
    "这节课，我们的任务是做一个快手用户的活跃预测。假如我们拿到了一份快手平台记录的关于快手用户的30天一个行为数据集(记录用户注册，登录，视频观看与发布，互动的记录），我们的目标就是根据这个行为数据集预测在未来七天的活跃用户<br><br>\n",
    "\n",
    "任务分为如下几部分：\n",
    ">* 任务目标与数据分析\n",
    ">* 整体模型架构\n",
    ">* 构建用户特征序列, 生成汇总表\n",
    ">* 制作标签\n",
    ">* 建立模型并训练\n",
    ">* 得出最终的模型结果\n",
    ">* 知识点和思路总结"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T03:05:29.461748Z",
     "start_time": "2020-03-06T03:05:26.705375Z"
    }
   },
   "outputs": [],
   "source": [
    "\"\"\"先导入包\"\"\"\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "import datetime\n",
    "\n",
    "import tensorflow as tf\n",
    "from deep_tools import f\n",
    "from deep_tools import DataGenerator"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 任务目标与数据分析\n",
    "在这一部分，我们先看看拿到的是一份什么样的数据，然后分析一下我们这个任务到底怎么应该去做。\n",
    "<br><br>我们会拿到四个表格，分别是：\n",
    "* 用户注册日志表，记录的是用户什么时候使用什么方式（微信，qq）什么设备（手机，pad）进行注册的快手账号，会有四个字段的信息，注意，day这一列，由于我们搜集的是30天的数据，所以这里的取值是1-30， 表示的是用户第几天的行为，后面那几份数据也是一样。<br>\n",
    "![](img/1.png)\n",
    "<br>\n",
    "* APP启动日志表，记录的是用户在第几天登录过快手app， 两个字段的信息<br>\n",
    "![](img/2.png)\n",
    "<br>\n",
    "* 视频创建日志表， 记录的是用户在第几天创作过视频 <br>\n",
    "![](img/3.png)\n",
    "<br>\n",
    "* 用户行为日志表，这个比较关键，也是我们后面制作特征的主要渠道来源，由用户的行为才能看出用户是不是活跃<br>\n",
    "![](img/4.png)\n",
    "<br>\n",
    "\n",
    "下面，我们就导入数据，详细的看一下这些数据吧"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:37:33.254804Z",
     "start_time": "2020-03-06T00:37:33.206886Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>register_day</th>\n",
       "      <th>register_type</th>\n",
       "      <th>device_type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>744025</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>283</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1270299</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>259</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>571220</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1308501</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>745554</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   user_id  register_day  register_type  device_type\n",
       "0   744025             1              1          283\n",
       "1  1270299             1              1          259\n",
       "2   571220             1              1            2\n",
       "3  1308501             1              0           23\n",
       "4   745554             1              2            0"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"\"\"读取数据集\"\"\"\n",
    "register = pd.read_csv('user_register_log.txt', sep='\\t', names=['user_id', 'register_day', 'register_type', 'device_type'])\n",
    "register.head()   # 注意这里的register_day 不一定都是1， 1代表我们搜集的30天里面，这个是第1天就注册了，还有的不是第一天注册的，后面会分析。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:37:41.488748Z",
     "start_time": "2020-03-06T00:37:35.288322Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>act_day</th>\n",
       "      <th>page</th>\n",
       "      <th>video_id</th>\n",
       "      <th>author_id</th>\n",
       "      <th>act_type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1062323</td>\n",
       "      <td>22</td>\n",
       "      <td>3</td>\n",
       "      <td>2877472</td>\n",
       "      <td>880271</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>639898</td>\n",
       "      <td>17</td>\n",
       "      <td>3</td>\n",
       "      <td>740662</td>\n",
       "      <td>210200</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1260200</td>\n",
       "      <td>5</td>\n",
       "      <td>3</td>\n",
       "      <td>3332414</td>\n",
       "      <td>162866</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>817201</td>\n",
       "      <td>22</td>\n",
       "      <td>3</td>\n",
       "      <td>1129617</td>\n",
       "      <td>530246</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>817201</td>\n",
       "      <td>23</td>\n",
       "      <td>3</td>\n",
       "      <td>1129617</td>\n",
       "      <td>530246</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   user_id  act_day  page  video_id  author_id  act_type\n",
       "0  1062323       22     3   2877472     880271         0\n",
       "1   639898       17     3    740662     210200         0\n",
       "2  1260200        5     3   3332414     162866         0\n",
       "3   817201       22     3   1129617     530246         0\n",
       "4   817201       23     3   1129617     530246         0"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "launch = pd.read_csv('app_launch_log.txt', sep='\\t', names=['user_id', 'launch_day'])\n",
    "create = pd.read_csv('video_create_log.txt', sep='\\t', names=['user_id', 'create_day'])\n",
    "activity = pd.read_csv('user_activity_log.txt', sep='\\t', names=['user_id', 'act_day', 'page', 'video_id', 'author_id', 'act_type'])\n",
    "activity.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:30:08.438243Z",
     "start_time": "2020-03-06T00:30:08.432294Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>launch_day</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>383135</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>330986</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>330986</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>330986</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>330986</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   user_id  launch_day\n",
       "0   383135           1\n",
       "1   330986           4\n",
       "2   330986           9\n",
       "3   330986          11\n",
       "4   330986          12"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "launch.head()   # 记录用户第几天登录过"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:30:11.342467Z",
     "start_time": "2020-03-06T00:30:11.336483Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>create_day</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>720497</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>720497</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>720497</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1075211</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1075211</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   user_id  create_day\n",
       "0   720497           1\n",
       "1   720497           1\n",
       "2   720497           1\n",
       "3  1075211           6\n",
       "4  1075211          12"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "create.head()   # 记录用户哪一天创建过视频信息"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "下面，我们开始对这个数据进行一个解析了， 我们拿到的是一个连续的30天之内用户的一个行为数据，包含了四个数据集，分别记录用户的注册，登录，创建视频，使用行为的信息， 但是有一个问题要注意，就是不一定每个用户的信息都是30天的记录，因为，我们这里有一个注册信息表，里面有一个register_day的字段，这个字段不一定所有用户都是1，即不一定每个用户都是在第一天进行注册的。比如，假设一个用户在第七天才注册的，那么前七天就没有这个用户的信息，假设一个用户是在第25天注册的，那么这个用户只有后五天的数据。 所以这是这个任务的一个难点所在，就是**每个用户的序列长度并不是一样的**， 所有后面我们分析的时候，对于一个用户，先分析是在哪一天注册的，我们再从这一天开始去算。\n",
    "\n",
    "<br><br> \n",
    "再就是我们任务进行一个解析，我们拿到了每个用户的这样的数据，是要预测未来的活跃度，注意这个未来，不是接下来的一两天，而是挺长的一段时间，一个周期这样的。我们这里是预测未来七天内的， 比如有个用户第七天注册了，我们预测的是他第七天到第十四天的活跃度的可能性。这就是我们的目标，基于之前的一段序列数据，来预测未来七天的活跃度的可能性。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 整体模型架构\n",
    "这一块，主要是介绍最终介绍的模型长什么样子，根据这个模型，去倒推我们需要去构建什么样的特征和标签（这其实也是一种考虑问题的方式，之前我们可能都是拿到数据，然后特征工程，然后根据我们制作的特征和标签去构建一系列模型，进行预测分类等。 但是有时候我们拿到一个任务之后，或许一下子不太明白究竟要做什么样的数据出来，尤其是这种实际的任务分析。 ），这时候，我们不妨先从模型的角度去考虑任务，先看看什么样的模型适合解决这个任务，然后我们假设已经有了这样的一个模型，那么我们应该考虑这个模型要什么样的输入， 这样，我们再去做相应的输入出来，这也是考虑问题的一种方式吧。 所以这次先从模型开始。<br><br>\n",
    "关于模型的问题，我们做的虽然说预测用户的活跃度，但可以转化成一个二分类的问题，最后输出就是未来七天时间内，这个用户是否活跃，0或者1. 既然是二分类的问题，那么这里的模型选择就比较多了，什么xgb，lgb，这些优秀的机器学习算法都可以，但是我们分析一下，我们最后拿到的这个数据应该是针对某一个用户，会有从他注册到后面行为的一系列信息，而这些都是时间上进行相关的，比如一个用户第七天注册了，那么我们就有这个用户第七天到第30天的各种行为，也是一种时间序列的预测。关于这种时间序列的预测，如果要使用机器学习的方式，就需要用滑动窗口去切割数据集，并且特征提取上需要使用历史的统计量。<br><br>我们这里使用神经网络的方式，也就是RNN来完成这个任务，这样不需要对输入序列做过多处理，也不使用滑动窗口。毕竟时间的监督学习任务，RNN还是比较擅长的，能够捕捉到时间的这种关联信息。 <br><br>\n",
    "使用RNN，一般地会想到如下解决方案：以几天内的用户行为序列为输入，以未来七天该用户是否活跃为标签，标注该序列。这是一种Many2One的解决方案。但是这样做的话为了充分利用数据，需要对训练数据做大量的滑窗，以实现数据增广，计算成本高。另外，每个序列只有一个标签，梯度难以传导，导致训练困难。所以我们可以考虑Many2Many结构，即每个输入都对应输出之后7天是否活跃，充分利用监督信息，减轻梯度传到负担，使训练更加容易。我们就可以构建出RNN的大体模型长这样：\n",
    "![](img/6.png)\n",
    "<br><br> 这样我们的网络架构就构思出来了，但是这里还有一个细节，就是序列是变长的，就是用户的记录天数是不同的，每个batch中取相同长度的序列，不同batch长度不同，每次随机取某一长度的batch。这时候我们需要使用动态RNN，根据时间序列的长度自己调整。 \n",
    "\n",
    "那么我们怎么去构建数据呢？ 我们知道上面的都是一些label值，也就是0或者1的这些，表示活跃不活跃。 下面的序列就是我们的输入数据，但是t1,t2,...tn这些数据应该是长什么样子呢？  "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 构建用户特征序列\n",
    "这一块，是我们的重点。我们就是要看看这个用户特征序列究竟怎么样才能构建出来。 思路如下：\n",
    ">1. 保存每个用户的记录数据\n",
    ">2. 创建用户字典\n",
    ">3. 构造用户特征序列\n"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 保存每个用户的记录数据\n",
    "既然之前我们说过，每个用户的记录序列长度是不一样子的，所以这个地方我们应该首先先统计每个用户到底有几天的记录数据，把这个长度我们先保存下来。这个比较简单，直接用总天数减去他注册的时间就可以啦。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:37:47.499868Z",
     "start_time": "2020-03-06T00:37:47.486904Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>register_day</th>\n",
       "      <th>register_type</th>\n",
       "      <th>device_type</th>\n",
       "      <th>seq_length</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>744025</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>283</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1270299</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>259</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>571220</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1308501</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>23</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>745554</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>0</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   user_id  register_day  register_type  device_type  seq_length\n",
       "0   744025             1              1          283          30\n",
       "1  1270299             1              1          259          30\n",
       "2   571220             1              1            2          30\n",
       "3  1308501             1              0           23          30\n",
       "4   745554             1              2            0          30"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"\"\"计算序列长度： 持续时间 = 数据总时间 - 注册时间\"\"\"\n",
    "register['seq_length'] = 31 - register['register_day']\n",
    "register.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 创建用户记录字典\n",
    "根据前面的记录天数，创建一个字典，来存储不同记录天数的用户到底有哪些, key表示记录长度，value表示用户id。\n",
    "比如只有1天记录的有哪些用户，2天记录的有哪些，...30天完整记录的用户有哪些），这个的目的就是因为我们的用户序列都不等长，也就是每个用户的记录天数不一定一样，这样就导致如果统一喂入神经网络的话，没法组成一个矩阵的形式， 但如果根据记录天数把用户给分开了，那么同一个记录天数下会有很多用户，这些序列是等长的， 那么我们就可以把这些划分成一个batch给神经网络，就好处理了。就是网络的输入接收的每个batch的序列长度要求是相同的，但是不同batch的序列可以不同。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:37:54.741639Z",
     "start_time": "2020-03-06T00:37:50.294091Z"
    }
   },
   "outputs": [],
   "source": [
    "\"\"\"根据前面的记录天数，创建一个字典，来存储不同记录天数的用户到底有哪些 \"\"\"\n",
    "user_queue = {i: [] for i in range(1,31)}\n",
    "\n",
    "for index, row in register.iterrows():   # 这个iterrows是对DataFrame进行行遍历，是在数据框中的行进行迭代的一个生成器，它返回每行的索引及一个包含行本身的对象。\n",
    "    user_queue[row[-1]].append(row[0])     # row[-1]是seq_length, row[0]是user_id"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T04:53:20.090094Z",
     "start_time": "2020-03-05T04:53:20.085107Z"
    }
   },
   "source": [
    "### 构建用户特征\n",
    "这一块，我们得考虑究竟怎么去提取特征呢？ 首先，得有一个特征的个数，就是针对每个用户，每天的记录，我们得提取多少个特征。 这些特征就是用户的行为，比如什么时候登陆，登陆之后，点没点赞，创没创建视频这些东西（都从数据集里面提取）。 所以对于一个用户来说，我们的输入数据最后应该是一个矩阵，每一行代表着记录的天数，每一列代表一个特征，看下面的图也知道为什么之前要统计不同记录对应的用户了吧，每个用户对应一个矩阵，然后很多个用户合起来就是一个3维的向量，这一个至少是一个立方体的形式。 如果用户的记录不一样的话，就没法进行用户的合并，所以我们这里有了这样一个字典之后，我们就可以把每个记录的用户看成一个batch放入神经网络了。\n",
    "![](img/7.png)<br>\n",
    "这一块的思路呢？  我们是要构建用户特征，所以我们定义一个用户序列的类，把所有相关的操作都放到用户序列的里面\n",
    "> 1. 首先，会构建出每个用户的特征矩阵，就是上面的那种矩阵构建出来，初始化为0， 这里假设特征列为15，即f=15\n",
    "> 2. 遍历上面的数据表，开始提取相应的特征，把这些特征填入相应用户的相应记录的相应特征中"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:40:03.289035Z",
     "start_time": "2020-03-06T00:40:03.282055Z"
    }
   },
   "outputs": [],
   "source": [
    "\"\"\"定义一个user_seq类\"\"\"\n",
    "class user_seq:\n",
    "    \n",
    "    def __init__(self, register_day, seq_length, n_features):\n",
    "        \"\"\"\n",
    "            register_day: 用户第几天进行的登录\n",
    "            seq_length: 用户序列的长度，就是记录了几天登录信息， 行数\n",
    "            n_features: 每天提出的特征个数， 列数\n",
    "        \"\"\"\n",
    "        self.register_day = register_day\n",
    "        self.seq_length = seq_length\n",
    "        self.array = np.zeros([seq_length, n_features])   # 这就是上面那个用户对应的矩阵形式，初始化位0\n",
    "        self.page_rank = np.zeros([self.seq_length])\n",
    "        self.pointer = 1\n",
    "    \n",
    "    # 提取特征填入特征矩阵\n",
    "    def put_feature(self, feature_number, string):\n",
    "        for i in string.split(','):\n",
    "            pos, value = i.split(':')     # 注册后的第几天进行了登录，1为指示符\n",
    "            self.array[int(pos)-self.register_day, feature_number] = 1   # 从注册后开始记录\n",
    "    \n",
    "    \n",
    "    def get_array(self):\n",
    "        return self.array\n",
    "    \n",
    "    # 得到标签  如果一个用户在未来七天活跃了，那么标记为1\n",
    "    def get_label(self):\n",
    "        self.label = np.array([None] * self.seq_length)    # 一个seq_length长度的数组\n",
    "        active = self.array[:, :12].sum(axis=1)          # 这里选了一部分特征做了个sum，意思是不管是转发，登录，啥的，只要做了就算一次活动\n",
    "        for i in range(self.seq_length-7):      # 这地方得控制一下，如果一个用户15-30的数据，那么我们标签最多只能到23天，因为30天之后的数据我们没有\n",
    "            self.label[i] = 1 * (np.sum(active[i+1:i+8]) > 0)    # 这里对于当前的i，如果未来七天内活跃过，那么标签就是1\n",
    "        \n",
    "        return self.label          "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 创建每个用户的二维矩阵，初始化为0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:40:12.407371Z",
     "start_time": "2020-03-06T00:40:07.325728Z"
    }
   },
   "outputs": [],
   "source": [
    "\"\"\"我们创建用户的那个记录矩阵\"\"\"\n",
    "n_features = 15\n",
    "data = {row[0]:user_seq(register_day=row[1], seq_length=row[-1], n_features=n_features) for index, row in register.iterrows()}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:30:56.934240Z",
     "start_time": "2020-03-06T00:30:56.894348Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{744025: <__main__.user_seq at 0x219001ba908>,\n",
       " 1270299: <__main__.user_seq at 0x219001ba630>,\n",
       " 571220: <__main__.user_seq at 0x219001ba8d0>,\n",
       " 1308501: <__main__.user_seq at 0x219001ba828>,\n",
       " 745554: <__main__.user_seq at 0x219001bad30>,\n",
       " 1031012: <__main__.user_seq at 0x219001bada0>,\n",
       " 913297: <__main__.user_seq at 0x219001ba898>,\n",
       " 266500: <__main__.user_seq at 0x219001badd8>,\n",
       " 475120: <__main__.user_seq at 0x2197fba4c18>,\n",
       " 547944: <__main__.user_seq at 0x2197fba4e10>,\n",
       " 916655: <__main__.user_seq at 0x2197fba4e48>,\n",
       " 719262: <__main__.user_seq at 0x2197fba4f60>,\n",
       " 1026175: <__main__.user_seq at 0x2197fba4f98>,\n",
       " 1140342: <__main__.user_seq at 0x2197fba4da0>,\n",
       " 688100: <__main__.user_seq at 0x2197fba4c50>,\n",
       " 1342459: <__main__.user_seq at 0x2197fba4be0>,\n",
       " 926263: <__main__.user_seq at 0x2197fba44e0>,\n",
       " 40710: <__main__.user_seq at 0x2197fba4fd0>,\n",
       " 246954: <__main__.user_seq at 0x2197fba4ba8>,\n",
       " 153579: <__main__.user_seq at 0x2197fba45f8>,\n",
       " 161418: <__main__.user_seq at 0x21900661278>,\n",
       " 649526: <__main__.user_seq at 0x21900661240>,\n",
       " 376694: <__main__.user_seq at 0x21900661940>,\n",
       " 1265894: <__main__.user_seq at 0x21900661978>,\n",
       " 290029: <__main__.user_seq at 0x21900661a90>,\n",
       " 926952: <__main__.user_seq at 0x21900661358>,\n",
       " 70931: <__main__.user_seq at 0x21900661f60>,\n",
       " 319938: <__main__.user_seq at 0x21900661748>,\n",
       " 711107: <__main__.user_seq at 0x21900661c88>,\n",
       " 872383: <__main__.user_seq at 0x21900661ef0>,\n",
       " 324085: <__main__.user_seq at 0x21900661eb8>,\n",
       " 720967: <__main__.user_seq at 0x21900661400>,\n",
       " 895912: <__main__.user_seq at 0x21900661908>,\n",
       " 396421: <__main__.user_seq at 0x21900661b38>,\n",
       " 605799: <__main__.user_seq at 0x219006617b8>,\n",
       " 374225: <__main__.user_seq at 0x219006617f0>,\n",
       " 188120: <__main__.user_seq at 0x21900661828>,\n",
       " 4416: <__main__.user_seq at 0x21900661860>,\n",
       " 245385: <__main__.user_seq at 0x21900661898>,\n",
       " 1244564: <__main__.user_seq at 0x21900661f98>,\n",
       " 321610: <__main__.user_seq at 0x219006610b8>,\n",
       " 998568: <__main__.user_seq at 0x21900661080>,\n",
       " 362447: <__main__.user_seq at 0x21900661048>,\n",
       " 508312: <__main__.user_seq at 0x21900661198>,\n",
       " 828824: <__main__.user_seq at 0x21900661208>,\n",
       " 604296: <__main__.user_seq at 0x21900661390>,\n",
       " 1040779: <__main__.user_seq at 0x21900661e80>,\n",
       " 104515: <__main__.user_seq at 0x21900661b70>,\n",
       " 909345: <__main__.user_seq at 0x21900661c50>,\n",
       " 584573: <__main__.user_seq at 0x21900661780>,\n",
       " 809615: <__main__.user_seq at 0x21900661550>,\n",
       " 705594: <__main__.user_seq at 0x21900661160>,\n",
       " 544673: <__main__.user_seq at 0x219006610f0>,\n",
       " 1353252: <__main__.user_seq at 0x21900661dd8>,\n",
       " 1228936: <__main__.user_seq at 0x21900661668>,\n",
       " 130304: <__main__.user_seq at 0x21900661f28>,\n",
       " 636433: <__main__.user_seq at 0x21900661e48>,\n",
       " 649913: <__main__.user_seq at 0x21900661470>,\n",
       " 300198: <__main__.user_seq at 0x21900661128>,\n",
       " 958588: <__main__.user_seq at 0x21900661e10>,\n",
       " 365947: <__main__.user_seq at 0x219006619b0>,\n",
       " 546663: <__main__.user_seq at 0x219006618d0>,\n",
       " 358836: <__main__.user_seq at 0x219006614e0>,\n",
       " 572651: <__main__.user_seq at 0x21900661d30>,\n",
       " 200677: <__main__.user_seq at 0x21900661a58>,\n",
       " 121072: <__main__.user_seq at 0x21900661c18>,\n",
       " 283372: <__main__.user_seq at 0x21900661ac8>,\n",
       " 1046808: <__main__.user_seq at 0x21900661438>,\n",
       " 286389: <__main__.user_seq at 0x21900661cc0>,\n",
       " 785752: <__main__.user_seq at 0x21900661d68>,\n",
       " 65439: <__main__.user_seq at 0x21900661a20>,\n",
       " 1070734: <__main__.user_seq at 0x21900661ba8>,\n",
       " 409296: <__main__.user_seq at 0x219006616a0>,\n",
       " 507130: <__main__.user_seq at 0x219006613c8>,\n",
       " 46089: <__main__.user_seq at 0x219006614a8>,\n",
       " 363195: <__main__.user_seq at 0x219006616d8>,\n",
       " 826213: <__main__.user_seq at 0x219006619e8>,\n",
       " 1095380: <__main__.user_seq at 0x21900661cf8>,\n",
       " 742578: <__main__.user_seq at 0x21900661da0>,\n",
       " 278433: <__main__.user_seq at 0x219006611d0>,\n",
       " 323276: <__main__.user_seq at 0x21900661518>,\n",
       " 1080404: <__main__.user_seq at 0x219006612b0>,\n",
       " 371793: <__main__.user_seq at 0x219006615c0>,\n",
       " 581535: <__main__.user_seq at 0x21900661710>,\n",
       " 623713: <__main__.user_seq at 0x21900661b00>,\n",
       " 613814: <__main__.user_seq at 0x21900661588>,\n",
       " 1230657: <__main__.user_seq at 0x21900661fd0>,\n",
       " 181217: <__main__.user_seq at 0x219006615f8>,\n",
       " 393403: <__main__.user_seq at 0x21900661be0>,\n",
       " 647111: <__main__.user_seq at 0x21900661630>,\n",
       " 301007: <__main__.user_seq at 0x21900669048>,\n",
       " 1720: <__main__.user_seq at 0x21900669080>,\n",
       " 135240: <__main__.user_seq at 0x219006690b8>,\n",
       " 1005097: <__main__.user_seq at 0x219006690f0>,\n",
       " 1265157: <__main__.user_seq at 0x21900669128>,\n",
       " 422203: <__main__.user_seq at 0x21900669160>,\n",
       " 491162: <__main__.user_seq at 0x21900669198>,\n",
       " 392276: <__main__.user_seq at 0x219006691d0>,\n",
       " 1119103: <__main__.user_seq at 0x21900669208>,\n",
       " 493601: <__main__.user_seq at 0x21900669240>,\n",
       " 987199: <__main__.user_seq at 0x21900669278>,\n",
       " 428929: <__main__.user_seq at 0x219006692b0>,\n",
       " 764894: <__main__.user_seq at 0x219006692e8>,\n",
       " 901027: <__main__.user_seq at 0x21900669320>,\n",
       " 716335: <__main__.user_seq at 0x21900669358>,\n",
       " 1132054: <__main__.user_seq at 0x21900669390>,\n",
       " 1201394: <__main__.user_seq at 0x219006693c8>,\n",
       " 79180: <__main__.user_seq at 0x21900669400>,\n",
       " 363940: <__main__.user_seq at 0x21900669438>,\n",
       " 1171561: <__main__.user_seq at 0x21900669470>,\n",
       " 29588: <__main__.user_seq at 0x219006694a8>,\n",
       " 225105: <__main__.user_seq at 0x219006694e0>,\n",
       " 479488: <__main__.user_seq at 0x21900669518>,\n",
       " 1349377: <__main__.user_seq at 0x21900669550>,\n",
       " 755950: <__main__.user_seq at 0x21900669588>,\n",
       " 867067: <__main__.user_seq at 0x219006695c0>,\n",
       " 1208320: <__main__.user_seq at 0x219006695f8>,\n",
       " 644685: <__main__.user_seq at 0x21900669630>,\n",
       " 580269: <__main__.user_seq at 0x21900669668>,\n",
       " 1278006: <__main__.user_seq at 0x219006696a0>,\n",
       " 900759: <__main__.user_seq at 0x219006696d8>,\n",
       " 301088: <__main__.user_seq at 0x21900669710>,\n",
       " 846124: <__main__.user_seq at 0x21900669748>,\n",
       " 873341: <__main__.user_seq at 0x21900669780>,\n",
       " 373134: <__main__.user_seq at 0x219006697b8>,\n",
       " 547864: <__main__.user_seq at 0x219006697f0>,\n",
       " 1145926: <__main__.user_seq at 0x21900669828>,\n",
       " 741300: <__main__.user_seq at 0x21900669860>,\n",
       " 685607: <__main__.user_seq at 0x21900669898>,\n",
       " 1096768: <__main__.user_seq at 0x219006698d0>,\n",
       " 544078: <__main__.user_seq at 0x21900669908>,\n",
       " 500537: <__main__.user_seq at 0x21900669940>,\n",
       " 1126528: <__main__.user_seq at 0x21900669978>,\n",
       " 470633: <__main__.user_seq at 0x219006699b0>,\n",
       " 1260044: <__main__.user_seq at 0x219006699e8>,\n",
       " 1147129: <__main__.user_seq at 0x21900669a20>,\n",
       " 708206: <__main__.user_seq at 0x21900669a58>,\n",
       " 578505: <__main__.user_seq at 0x21900669a90>,\n",
       " 473398: <__main__.user_seq at 0x21900669ac8>,\n",
       " 805787: <__main__.user_seq at 0x21900669b00>,\n",
       " 905493: <__main__.user_seq at 0x21900669b38>,\n",
       " 706631: <__main__.user_seq at 0x21900669b70>,\n",
       " 875685: <__main__.user_seq at 0x21900669ba8>,\n",
       " 969252: <__main__.user_seq at 0x21900669be0>,\n",
       " 24482: <__main__.user_seq at 0x21900669c18>,\n",
       " 935166: <__main__.user_seq at 0x21900669c50>,\n",
       " 1316877: <__main__.user_seq at 0x21900669c88>,\n",
       " 1163109: <__main__.user_seq at 0x21900669cc0>,\n",
       " 657176: <__main__.user_seq at 0x21900669cf8>,\n",
       " 1024790: <__main__.user_seq at 0x21900669d30>,\n",
       " 1216256: <__main__.user_seq at 0x21900669d68>,\n",
       " 908794: <__main__.user_seq at 0x21900669da0>,\n",
       " 154609: <__main__.user_seq at 0x21900669dd8>,\n",
       " 1283254: <__main__.user_seq at 0x21900669e10>,\n",
       " 498488: <__main__.user_seq at 0x21900669e48>,\n",
       " 969395: <__main__.user_seq at 0x21900669e80>,\n",
       " 64315: <__main__.user_seq at 0x21900669eb8>,\n",
       " 354563: <__main__.user_seq at 0x21900669ef0>,\n",
       " 1356592: <__main__.user_seq at 0x21900669f28>,\n",
       " 706245: <__main__.user_seq at 0x21900669f60>,\n",
       " 173080: <__main__.user_seq at 0x21900669f98>,\n",
       " 315508: <__main__.user_seq at 0x21900669fd0>,\n",
       " 889586: <__main__.user_seq at 0x21900674048>,\n",
       " 932852: <__main__.user_seq at 0x21900674080>,\n",
       " 196795: <__main__.user_seq at 0x219006740b8>,\n",
       " 700459: <__main__.user_seq at 0x219006740f0>,\n",
       " 784518: <__main__.user_seq at 0x21900674128>,\n",
       " 1149160: <__main__.user_seq at 0x21900674160>,\n",
       " 251319: <__main__.user_seq at 0x21900674198>,\n",
       " 526703: <__main__.user_seq at 0x219006741d0>,\n",
       " 320032: <__main__.user_seq at 0x21900674208>,\n",
       " 119327: <__main__.user_seq at 0x21900674240>,\n",
       " 627445: <__main__.user_seq at 0x21900674278>,\n",
       " 1333459: <__main__.user_seq at 0x219006742b0>,\n",
       " 588012: <__main__.user_seq at 0x219006742e8>,\n",
       " 12034: <__main__.user_seq at 0x21900674320>,\n",
       " 146820: <__main__.user_seq at 0x21900674358>,\n",
       " 1243074: <__main__.user_seq at 0x21900674390>,\n",
       " 271512: <__main__.user_seq at 0x219006743c8>,\n",
       " 1257585: <__main__.user_seq at 0x21900674400>,\n",
       " 1124798: <__main__.user_seq at 0x21900674438>,\n",
       " 82342: <__main__.user_seq at 0x21900674470>,\n",
       " 1045093: <__main__.user_seq at 0x219006744a8>,\n",
       " 1087280: <__main__.user_seq at 0x219006744e0>,\n",
       " 182906: <__main__.user_seq at 0x21900674518>,\n",
       " 934918: <__main__.user_seq at 0x21900674550>,\n",
       " 856907: <__main__.user_seq at 0x21900674588>,\n",
       " 564522: <__main__.user_seq at 0x219006745c0>,\n",
       " 889866: <__main__.user_seq at 0x219006745f8>,\n",
       " 986839: <__main__.user_seq at 0x21900674630>,\n",
       " 551821: <__main__.user_seq at 0x21900674668>,\n",
       " 988294: <__main__.user_seq at 0x219006746a0>,\n",
       " 1022936: <__main__.user_seq at 0x219006746d8>,\n",
       " 349043: <__main__.user_seq at 0x21900674710>,\n",
       " 1010794: <__main__.user_seq at 0x21900674748>,\n",
       " 1274576: <__main__.user_seq at 0x21900674780>,\n",
       " 109973: <__main__.user_seq at 0x219006747b8>,\n",
       " 134299: <__main__.user_seq at 0x219006747f0>,\n",
       " 1005835: <__main__.user_seq at 0x21900674828>,\n",
       " 864582: <__main__.user_seq at 0x21900674860>,\n",
       " 1293122: <__main__.user_seq at 0x21900674898>,\n",
       " 896835: <__main__.user_seq at 0x219006748d0>,\n",
       " 630631: <__main__.user_seq at 0x21900674908>,\n",
       " 1121791: <__main__.user_seq at 0x21900674940>,\n",
       " 1038314: <__main__.user_seq at 0x21900674978>,\n",
       " 123473: <__main__.user_seq at 0x219006749b0>,\n",
       " 916883: <__main__.user_seq at 0x219006749e8>,\n",
       " 627561: <__main__.user_seq at 0x21900674a20>,\n",
       " 1343228: <__main__.user_seq at 0x21900674a58>,\n",
       " 1134049: <__main__.user_seq at 0x21900674a90>,\n",
       " 1097140: <__main__.user_seq at 0x21900674ac8>,\n",
       " 192598: <__main__.user_seq at 0x21900674b00>,\n",
       " 1084176: <__main__.user_seq at 0x21900674b38>,\n",
       " 699788: <__main__.user_seq at 0x21900674b70>,\n",
       " 1206272: <__main__.user_seq at 0x21900674ba8>,\n",
       " 1357808: <__main__.user_seq at 0x21900674be0>,\n",
       " 879812: <__main__.user_seq at 0x21900674c18>,\n",
       " 178800: <__main__.user_seq at 0x21900674c50>,\n",
       " 6142: <__main__.user_seq at 0x21900674c88>,\n",
       " 744006: <__main__.user_seq at 0x21900674cc0>,\n",
       " 498016: <__main__.user_seq at 0x21900674cf8>,\n",
       " 603422: <__main__.user_seq at 0x21900674d30>,\n",
       " 817397: <__main__.user_seq at 0x21900674d68>,\n",
       " 279797: <__main__.user_seq at 0x21900674da0>,\n",
       " 42931: <__main__.user_seq at 0x21900674dd8>,\n",
       " 477509: <__main__.user_seq at 0x21900674e10>,\n",
       " 768177: <__main__.user_seq at 0x21900674e48>,\n",
       " 1275284: <__main__.user_seq at 0x21900674e80>,\n",
       " 844601: <__main__.user_seq at 0x21900674eb8>,\n",
       " 82524: <__main__.user_seq at 0x21900674ef0>,\n",
       " 73158: <__main__.user_seq at 0x21900674f28>,\n",
       " 1139294: <__main__.user_seq at 0x21900674f60>,\n",
       " 1102709: <__main__.user_seq at 0x21900674f98>,\n",
       " 52918: <__main__.user_seq at 0x21900674fd0>,\n",
       " 85132: <__main__.user_seq at 0x2190067b048>,\n",
       " 23948: <__main__.user_seq at 0x2190067b080>,\n",
       " 201951: <__main__.user_seq at 0x2190067b0b8>,\n",
       " 343886: <__main__.user_seq at 0x2190067b0f0>,\n",
       " 671062: <__main__.user_seq at 0x2190067b128>,\n",
       " 1039738: <__main__.user_seq at 0x2190067b160>,\n",
       " 310025: <__main__.user_seq at 0x2190067b198>,\n",
       " 1266850: <__main__.user_seq at 0x2190067b1d0>,\n",
       " 590886: <__main__.user_seq at 0x2190067b2b0>,\n",
       " 942055: <__main__.user_seq at 0x2190067b2e8>,\n",
       " 694183: <__main__.user_seq at 0x2190067b320>,\n",
       " 1302790: <__main__.user_seq at 0x2190067b358>,\n",
       " 1352813: <__main__.user_seq at 0x2190067b390>,\n",
       " 219457: <__main__.user_seq at 0x2190067b3c8>,\n",
       " 1273778: <__main__.user_seq at 0x2190067b400>,\n",
       " 615136: <__main__.user_seq at 0x2190067b438>,\n",
       " 692306: <__main__.user_seq at 0x2190067b470>,\n",
       " 234824: <__main__.user_seq at 0x2190067b4a8>,\n",
       " 797113: <__main__.user_seq at 0x2190067b4e0>,\n",
       " 1168061: <__main__.user_seq at 0x2190067b518>,\n",
       " 933116: <__main__.user_seq at 0x2190067b550>,\n",
       " 675189: <__main__.user_seq at 0x2190067b588>,\n",
       " 117234: <__main__.user_seq at 0x2190067b5c0>,\n",
       " 473215: <__main__.user_seq at 0x2190067b5f8>,\n",
       " 693597: <__main__.user_seq at 0x2190067b630>,\n",
       " 292217: <__main__.user_seq at 0x2190067b668>,\n",
       " 318189: <__main__.user_seq at 0x2190067b6a0>,\n",
       " 893024: <__main__.user_seq at 0x2190067b6d8>,\n",
       " 1147778: <__main__.user_seq at 0x2190067b710>,\n",
       " 75464: <__main__.user_seq at 0x2190067b748>,\n",
       " 355948: <__main__.user_seq at 0x2190067b780>,\n",
       " 1141243: <__main__.user_seq at 0x2190067b7b8>,\n",
       " 885314: <__main__.user_seq at 0x2190067b7f0>,\n",
       " 473037: <__main__.user_seq at 0x2190067b828>,\n",
       " 1161976: <__main__.user_seq at 0x2190067b860>,\n",
       " 1105249: <__main__.user_seq at 0x2190067b898>,\n",
       " 1034711: <__main__.user_seq at 0x2190067b8d0>,\n",
       " 444663: <__main__.user_seq at 0x2190067b908>,\n",
       " 629789: <__main__.user_seq at 0x2190067b940>,\n",
       " 684292: <__main__.user_seq at 0x2190067b978>,\n",
       " 1220188: <__main__.user_seq at 0x2190067b9b0>,\n",
       " 38479: <__main__.user_seq at 0x2190067b9e8>,\n",
       " 1166260: <__main__.user_seq at 0x2190067ba20>,\n",
       " 739798: <__main__.user_seq at 0x2190067ba58>,\n",
       " 1023596: <__main__.user_seq at 0x2190067ba90>,\n",
       " 731282: <__main__.user_seq at 0x2190067bac8>,\n",
       " 759110: <__main__.user_seq at 0x2190067bb00>,\n",
       " 327708: <__main__.user_seq at 0x2190067bb38>,\n",
       " 129695: <__main__.user_seq at 0x2190067bb70>,\n",
       " 1344791: <__main__.user_seq at 0x2190067bba8>,\n",
       " 1096813: <__main__.user_seq at 0x2190067bbe0>,\n",
       " 848341: <__main__.user_seq at 0x2190067bc18>,\n",
       " 1068843: <__main__.user_seq at 0x2190067bc50>,\n",
       " 419912: <__main__.user_seq at 0x2190067bc88>,\n",
       " 823586: <__main__.user_seq at 0x2190067bcc0>,\n",
       " 296386: <__main__.user_seq at 0x2190067bcf8>,\n",
       " 1161945: <__main__.user_seq at 0x2190067bd30>,\n",
       " 200400: <__main__.user_seq at 0x2190067bd68>,\n",
       " 1195373: <__main__.user_seq at 0x2190067bda0>,\n",
       " 973391: <__main__.user_seq at 0x2190067bdd8>,\n",
       " 65575: <__main__.user_seq at 0x2190067be10>,\n",
       " 837576: <__main__.user_seq at 0x2190067be48>,\n",
       " 298119: <__main__.user_seq at 0x2190067be80>,\n",
       " 1358198: <__main__.user_seq at 0x2190067beb8>,\n",
       " 375546: <__main__.user_seq at 0x2190067bef0>,\n",
       " 544646: <__main__.user_seq at 0x2190067bf28>,\n",
       " 607849: <__main__.user_seq at 0x2190067bf60>,\n",
       " 354025: <__main__.user_seq at 0x2190067bf98>,\n",
       " 1331521: <__main__.user_seq at 0x2190067bfd0>,\n",
       " 1191566: <__main__.user_seq at 0x21900680048>,\n",
       " 199629: <__main__.user_seq at 0x21900680080>,\n",
       " 1236008: <__main__.user_seq at 0x219006800b8>,\n",
       " 214542: <__main__.user_seq at 0x219006800f0>,\n",
       " 350622: <__main__.user_seq at 0x21900680128>,\n",
       " 190614: <__main__.user_seq at 0x21900680160>,\n",
       " 964475: <__main__.user_seq at 0x21900680198>,\n",
       " 45704: <__main__.user_seq at 0x219006801d0>,\n",
       " 878391: <__main__.user_seq at 0x21900680208>,\n",
       " 1105526: <__main__.user_seq at 0x21900680240>,\n",
       " 164445: <__main__.user_seq at 0x21900680278>,\n",
       " 488255: <__main__.user_seq at 0x219006802b0>,\n",
       " 143944: <__main__.user_seq at 0x219006802e8>,\n",
       " 802240: <__main__.user_seq at 0x21900680320>,\n",
       " 1314381: <__main__.user_seq at 0x21900680358>,\n",
       " 863520: <__main__.user_seq at 0x21900680390>,\n",
       " 322780: <__main__.user_seq at 0x219006803c8>,\n",
       " 1115620: <__main__.user_seq at 0x21900680400>,\n",
       " 1004240: <__main__.user_seq at 0x21900680438>,\n",
       " 91631: <__main__.user_seq at 0x21900680470>,\n",
       " 1306292: <__main__.user_seq at 0x219006804a8>,\n",
       " 305295: <__main__.user_seq at 0x219006804e0>,\n",
       " 46877: <__main__.user_seq at 0x21900680518>,\n",
       " 1366339: <__main__.user_seq at 0x21900680550>,\n",
       " 1055951: <__main__.user_seq at 0x21900680588>,\n",
       " 1186938: <__main__.user_seq at 0x219006805c0>,\n",
       " 253904: <__main__.user_seq at 0x219006805f8>,\n",
       " 78349: <__main__.user_seq at 0x21900680630>,\n",
       " 1260188: <__main__.user_seq at 0x21900680668>,\n",
       " 1016609: <__main__.user_seq at 0x219006806a0>,\n",
       " 993751: <__main__.user_seq at 0x219006806d8>,\n",
       " 826191: <__main__.user_seq at 0x21900680710>,\n",
       " 1042464: <__main__.user_seq at 0x21900680748>,\n",
       " 600907: <__main__.user_seq at 0x21900680780>,\n",
       " 75238: <__main__.user_seq at 0x219006807b8>,\n",
       " 600462: <__main__.user_seq at 0x219006807f0>,\n",
       " 43426: <__main__.user_seq at 0x21900680828>,\n",
       " 1016709: <__main__.user_seq at 0x21900680860>,\n",
       " 1076150: <__main__.user_seq at 0x21900680898>,\n",
       " 861690: <__main__.user_seq at 0x219006808d0>,\n",
       " 1346568: <__main__.user_seq at 0x21900680908>,\n",
       " 461873: <__main__.user_seq at 0x21900680940>,\n",
       " 1102232: <__main__.user_seq at 0x21900680978>,\n",
       " 1056760: <__main__.user_seq at 0x219006809b0>,\n",
       " 1360047: <__main__.user_seq at 0x219006809e8>,\n",
       " 548821: <__main__.user_seq at 0x21900680a20>,\n",
       " 525224: <__main__.user_seq at 0x21900680a58>,\n",
       " 626427: <__main__.user_seq at 0x21900680a90>,\n",
       " 354599: <__main__.user_seq at 0x21900680ac8>,\n",
       " 892684: <__main__.user_seq at 0x21900680b00>,\n",
       " 294385: <__main__.user_seq at 0x21900680b38>,\n",
       " 488384: <__main__.user_seq at 0x21900680b70>,\n",
       " 1127998: <__main__.user_seq at 0x21900680ba8>,\n",
       " 171819: <__main__.user_seq at 0x21900680be0>,\n",
       " 1197226: <__main__.user_seq at 0x21900680c18>,\n",
       " 66852: <__main__.user_seq at 0x21900680c50>,\n",
       " 1111524: <__main__.user_seq at 0x21900680c88>,\n",
       " 1103093: <__main__.user_seq at 0x21900680cc0>,\n",
       " 166587: <__main__.user_seq at 0x21900680cf8>,\n",
       " 1090147: <__main__.user_seq at 0x21900680d30>,\n",
       " 401543: <__main__.user_seq at 0x21900680d68>,\n",
       " 979232: <__main__.user_seq at 0x21900680da0>,\n",
       " 1079600: <__main__.user_seq at 0x21900680dd8>,\n",
       " 231285: <__main__.user_seq at 0x21900680e10>,\n",
       " 909695: <__main__.user_seq at 0x21900680e48>,\n",
       " 259356: <__main__.user_seq at 0x21900680e80>,\n",
       " 482351: <__main__.user_seq at 0x21900680eb8>,\n",
       " 45605: <__main__.user_seq at 0x21900680ef0>,\n",
       " 1308171: <__main__.user_seq at 0x21900680f28>,\n",
       " 307872: <__main__.user_seq at 0x21900680f60>,\n",
       " 308051: <__main__.user_seq at 0x21900680f98>,\n",
       " 491446: <__main__.user_seq at 0x21900680fd0>,\n",
       " 550643: <__main__.user_seq at 0x21900689048>,\n",
       " 347099: <__main__.user_seq at 0x21900689080>,\n",
       " 647478: <__main__.user_seq at 0x219006890b8>,\n",
       " 1351534: <__main__.user_seq at 0x219006890f0>,\n",
       " 367241: <__main__.user_seq at 0x21900689128>,\n",
       " 578309: <__main__.user_seq at 0x21900689160>,\n",
       " 410784: <__main__.user_seq at 0x21900689198>,\n",
       " 374871: <__main__.user_seq at 0x219006891d0>,\n",
       " 820690: <__main__.user_seq at 0x21900689208>,\n",
       " 80545: <__main__.user_seq at 0x21900689240>,\n",
       " 482040: <__main__.user_seq at 0x21900689278>,\n",
       " 660628: <__main__.user_seq at 0x219006892b0>,\n",
       " 657616: <__main__.user_seq at 0x219006892e8>,\n",
       " 406622: <__main__.user_seq at 0x21900689320>,\n",
       " 46519: <__main__.user_seq at 0x21900689358>,\n",
       " 440020: <__main__.user_seq at 0x21900689390>,\n",
       " 838388: <__main__.user_seq at 0x219006893c8>,\n",
       " 372368: <__main__.user_seq at 0x21900689400>,\n",
       " 1028559: <__main__.user_seq at 0x21900689438>,\n",
       " 1014699: <__main__.user_seq at 0x21900689470>,\n",
       " 311119: <__main__.user_seq at 0x219006894a8>,\n",
       " 540632: <__main__.user_seq at 0x219006894e0>,\n",
       " 1174064: <__main__.user_seq at 0x21900689518>,\n",
       " 1288325: <__main__.user_seq at 0x21900689550>,\n",
       " 574156: <__main__.user_seq at 0x21900689588>,\n",
       " 277490: <__main__.user_seq at 0x219006895c0>,\n",
       " 1359548: <__main__.user_seq at 0x219006895f8>,\n",
       " 853695: <__main__.user_seq at 0x21900689630>,\n",
       " 53864: <__main__.user_seq at 0x21900689668>,\n",
       " 158030: <__main__.user_seq at 0x219006896a0>,\n",
       " 497272: <__main__.user_seq at 0x219006896d8>,\n",
       " 699878: <__main__.user_seq at 0x21900689710>,\n",
       " 908320: <__main__.user_seq at 0x21900689748>,\n",
       " 747066: <__main__.user_seq at 0x21900689780>,\n",
       " 294696: <__main__.user_seq at 0x219006897b8>,\n",
       " 307612: <__main__.user_seq at 0x219006897f0>,\n",
       " 1046782: <__main__.user_seq at 0x21900689828>,\n",
       " 47841: <__main__.user_seq at 0x21900689860>,\n",
       " 738018: <__main__.user_seq at 0x21900689898>,\n",
       " 241058: <__main__.user_seq at 0x219006898d0>,\n",
       " 1014282: <__main__.user_seq at 0x21900689908>,\n",
       " 1293090: <__main__.user_seq at 0x21900689940>,\n",
       " 1180298: <__main__.user_seq at 0x21900689978>,\n",
       " 436733: <__main__.user_seq at 0x219006899b0>,\n",
       " 547218: <__main__.user_seq at 0x219006899e8>,\n",
       " 380844: <__main__.user_seq at 0x21900689a20>,\n",
       " 1266749: <__main__.user_seq at 0x21900689a58>,\n",
       " 130330: <__main__.user_seq at 0x21900689a90>,\n",
       " 1277184: <__main__.user_seq at 0x21900689ac8>,\n",
       " 726068: <__main__.user_seq at 0x21900689b00>,\n",
       " 801739: <__main__.user_seq at 0x21900689b38>,\n",
       " 1171263: <__main__.user_seq at 0x21900689b70>,\n",
       " 427082: <__main__.user_seq at 0x21900689ba8>,\n",
       " 856947: <__main__.user_seq at 0x21900689be0>,\n",
       " 1083614: <__main__.user_seq at 0x21900689c18>,\n",
       " 1043223: <__main__.user_seq at 0x21900689c50>,\n",
       " 772432: <__main__.user_seq at 0x2190067b278>,\n",
       " 1100998: <__main__.user_seq at 0x21900689c88>,\n",
       " 635545: <__main__.user_seq at 0x21900689cc0>,\n",
       " 263338: <__main__.user_seq at 0x21900689cf8>,\n",
       " 1010055: <__main__.user_seq at 0x21900689d30>,\n",
       " 452297: <__main__.user_seq at 0x21900689d68>,\n",
       " 849233: <__main__.user_seq at 0x21900689da0>,\n",
       " 1232419: <__main__.user_seq at 0x21900689dd8>,\n",
       " 149945: <__main__.user_seq at 0x21900689e10>,\n",
       " 625544: <__main__.user_seq at 0x21900689e48>,\n",
       " 1248579: <__main__.user_seq at 0x21900689e80>,\n",
       " 539818: <__main__.user_seq at 0x21900689eb8>,\n",
       " 1071059: <__main__.user_seq at 0x21900689ef0>,\n",
       " 1348111: <__main__.user_seq at 0x21900689f28>,\n",
       " 696972: <__main__.user_seq at 0x21900689f60>,\n",
       " 941328: <__main__.user_seq at 0x21900689f98>,\n",
       " 676679: <__main__.user_seq at 0x21900689fd0>,\n",
       " 1219114: <__main__.user_seq at 0x21900690048>,\n",
       " 292238: <__main__.user_seq at 0x21900690080>,\n",
       " 771775: <__main__.user_seq at 0x219006900b8>,\n",
       " 1228553: <__main__.user_seq at 0x219006900f0>,\n",
       " 614233: <__main__.user_seq at 0x21900690128>,\n",
       " 95904: <__main__.user_seq at 0x21900690160>,\n",
       " 270665: <__main__.user_seq at 0x21900690198>,\n",
       " 109064: <__main__.user_seq at 0x219006901d0>,\n",
       " 1094001: <__main__.user_seq at 0x21900690208>,\n",
       " 828445: <__main__.user_seq at 0x21900690240>,\n",
       " 990078: <__main__.user_seq at 0x21900690278>,\n",
       " 707687: <__main__.user_seq at 0x219006902b0>,\n",
       " 311009: <__main__.user_seq at 0x219006902e8>,\n",
       " 361304: <__main__.user_seq at 0x21900690320>,\n",
       " 18169: <__main__.user_seq at 0x21900690358>,\n",
       " 109313: <__main__.user_seq at 0x21900690390>,\n",
       " 184915: <__main__.user_seq at 0x219006903c8>,\n",
       " 1138461: <__main__.user_seq at 0x21900690400>,\n",
       " 787356: <__main__.user_seq at 0x21900690438>,\n",
       " 252311: <__main__.user_seq at 0x21900690470>,\n",
       " 57795: <__main__.user_seq at 0x219006904a8>,\n",
       " 516178: <__main__.user_seq at 0x219006904e0>,\n",
       " 405637: <__main__.user_seq at 0x21900690518>,\n",
       " 1363368: <__main__.user_seq at 0x21900690550>,\n",
       " 1196704: <__main__.user_seq at 0x21900690588>,\n",
       " 68485: <__main__.user_seq at 0x219006905c0>,\n",
       " 322656: <__main__.user_seq at 0x219006905f8>,\n",
       " 977835: <__main__.user_seq at 0x21900690630>,\n",
       " 1277123: <__main__.user_seq at 0x21900690668>,\n",
       " 424062: <__main__.user_seq at 0x219006906a0>,\n",
       " 250174: <__main__.user_seq at 0x219006906d8>,\n",
       " 1023526: <__main__.user_seq at 0x21900690710>,\n",
       " 449597: <__main__.user_seq at 0x21900690748>,\n",
       " 384182: <__main__.user_seq at 0x21900690780>,\n",
       " 50084: <__main__.user_seq at 0x219006907b8>,\n",
       " 118144: <__main__.user_seq at 0x219006907f0>,\n",
       " 1254191: <__main__.user_seq at 0x21900690828>,\n",
       " 348563: <__main__.user_seq at 0x21900690860>,\n",
       " 1282349: <__main__.user_seq at 0x21900690898>,\n",
       " 179263: <__main__.user_seq at 0x2190067b240>,\n",
       " 1095381: <__main__.user_seq at 0x2190067b208>,\n",
       " 911986: <__main__.user_seq at 0x219006908d0>,\n",
       " 1201628: <__main__.user_seq at 0x21900690908>,\n",
       " 1323759: <__main__.user_seq at 0x21900690940>,\n",
       " 281753: <__main__.user_seq at 0x21900690978>,\n",
       " 1246728: <__main__.user_seq at 0x219006909b0>,\n",
       " 1280301: <__main__.user_seq at 0x219006909e8>,\n",
       " 403903: <__main__.user_seq at 0x21900690a20>,\n",
       " 456923: <__main__.user_seq at 0x21900690a58>,\n",
       " 1165819: <__main__.user_seq at 0x21900690a90>,\n",
       " 452121: <__main__.user_seq at 0x21900690ac8>,\n",
       " 356773: <__main__.user_seq at 0x21900690b00>,\n",
       " 1362089: <__main__.user_seq at 0x21900690b38>,\n",
       " 767634: <__main__.user_seq at 0x21900690b70>,\n",
       " 254346: <__main__.user_seq at 0x21900690ba8>,\n",
       " 479405: <__main__.user_seq at 0x21900690be0>,\n",
       " 44820: <__main__.user_seq at 0x21900690c18>,\n",
       " 213980: <__main__.user_seq at 0x21900690c50>,\n",
       " 502744: <__main__.user_seq at 0x21900690c88>,\n",
       " 134649: <__main__.user_seq at 0x21900690cc0>,\n",
       " 146827: <__main__.user_seq at 0x21900690cf8>,\n",
       " 1026933: <__main__.user_seq at 0x21900690d30>,\n",
       " 466945: <__main__.user_seq at 0x21900690d68>,\n",
       " 910932: <__main__.user_seq at 0x21900690da0>,\n",
       " 971619: <__main__.user_seq at 0x21900690dd8>,\n",
       " 621028: <__main__.user_seq at 0x21900690e10>,\n",
       " 991248: <__main__.user_seq at 0x21900690e48>,\n",
       " 60028: <__main__.user_seq at 0x21900690e80>,\n",
       " 437170: <__main__.user_seq at 0x21900690eb8>,\n",
       " 421320: <__main__.user_seq at 0x21900690ef0>,\n",
       " 69464: <__main__.user_seq at 0x21900690f28>,\n",
       " 676314: <__main__.user_seq at 0x21900690f60>,\n",
       " 254269: <__main__.user_seq at 0x21900690f98>,\n",
       " 803095: <__main__.user_seq at 0x21900690fd0>,\n",
       " 379784: <__main__.user_seq at 0x21900696048>,\n",
       " 810769: <__main__.user_seq at 0x21900696080>,\n",
       " 115700: <__main__.user_seq at 0x219006960b8>,\n",
       " 282099: <__main__.user_seq at 0x219006960f0>,\n",
       " 935412: <__main__.user_seq at 0x21900696128>,\n",
       " 888078: <__main__.user_seq at 0x21900696160>,\n",
       " 1161970: <__main__.user_seq at 0x21900696198>,\n",
       " 254443: <__main__.user_seq at 0x219006961d0>,\n",
       " 820184: <__main__.user_seq at 0x21900696208>,\n",
       " 52445: <__main__.user_seq at 0x21900696240>,\n",
       " 739438: <__main__.user_seq at 0x21900696278>,\n",
       " 258311: <__main__.user_seq at 0x219006962b0>,\n",
       " 399174: <__main__.user_seq at 0x219006962e8>,\n",
       " 776599: <__main__.user_seq at 0x21900696320>,\n",
       " 818384: <__main__.user_seq at 0x21900696358>,\n",
       " 1365488: <__main__.user_seq at 0x21900696390>,\n",
       " 124486: <__main__.user_seq at 0x219006963c8>,\n",
       " 464769: <__main__.user_seq at 0x21900696400>,\n",
       " 374698: <__main__.user_seq at 0x21900696438>,\n",
       " 863663: <__main__.user_seq at 0x21900696470>,\n",
       " 997843: <__main__.user_seq at 0x219006964a8>,\n",
       " 1060779: <__main__.user_seq at 0x219006964e0>,\n",
       " 298288: <__main__.user_seq at 0x21900696518>,\n",
       " 538392: <__main__.user_seq at 0x21900696550>,\n",
       " 478546: <__main__.user_seq at 0x21900696588>,\n",
       " 934317: <__main__.user_seq at 0x219006965c0>,\n",
       " 1037223: <__main__.user_seq at 0x219006965f8>,\n",
       " 75456: <__main__.user_seq at 0x21900696630>,\n",
       " 49913: <__main__.user_seq at 0x21900696668>,\n",
       " 180441: <__main__.user_seq at 0x219006966a0>,\n",
       " 915432: <__main__.user_seq at 0x219006966d8>,\n",
       " 265620: <__main__.user_seq at 0x21900696710>,\n",
       " 1292525: <__main__.user_seq at 0x21900696748>,\n",
       " 314899: <__main__.user_seq at 0x21900696780>,\n",
       " 472147: <__main__.user_seq at 0x219006967b8>,\n",
       " 871404: <__main__.user_seq at 0x219006967f0>,\n",
       " 1011297: <__main__.user_seq at 0x21900696828>,\n",
       " 711978: <__main__.user_seq at 0x21900696860>,\n",
       " 142200: <__main__.user_seq at 0x21900696898>,\n",
       " 744880: <__main__.user_seq at 0x219006968d0>,\n",
       " 1196482: <__main__.user_seq at 0x21900696908>,\n",
       " 613158: <__main__.user_seq at 0x21900696940>,\n",
       " 385230: <__main__.user_seq at 0x21900696978>,\n",
       " 757343: <__main__.user_seq at 0x219006969b0>,\n",
       " 718863: <__main__.user_seq at 0x219006969e8>,\n",
       " 1306243: <__main__.user_seq at 0x21900696a20>,\n",
       " 494108: <__main__.user_seq at 0x21900696a58>,\n",
       " 292670: <__main__.user_seq at 0x21900696a90>,\n",
       " 810664: <__main__.user_seq at 0x21900696ac8>,\n",
       " 145531: <__main__.user_seq at 0x21900696b00>,\n",
       " 1204979: <__main__.user_seq at 0x21900696b38>,\n",
       " 1007878: <__main__.user_seq at 0x21900696b70>,\n",
       " 429640: <__main__.user_seq at 0x21900696ba8>,\n",
       " 408945: <__main__.user_seq at 0x21900696be0>,\n",
       " 1102438: <__main__.user_seq at 0x21900696c18>,\n",
       " 466836: <__main__.user_seq at 0x21900696c50>,\n",
       " 496107: <__main__.user_seq at 0x21900696c88>,\n",
       " 1222898: <__main__.user_seq at 0x21900696cc0>,\n",
       " 166312: <__main__.user_seq at 0x21900696cf8>,\n",
       " 421532: <__main__.user_seq at 0x21900696d30>,\n",
       " 1246316: <__main__.user_seq at 0x21900696d68>,\n",
       " 1136225: <__main__.user_seq at 0x21900696da0>,\n",
       " 54409: <__main__.user_seq at 0x21900696dd8>,\n",
       " 1355576: <__main__.user_seq at 0x21900696e10>,\n",
       " 1210417: <__main__.user_seq at 0x21900696e48>,\n",
       " 1306727: <__main__.user_seq at 0x21900696e80>,\n",
       " 74795: <__main__.user_seq at 0x21900696eb8>,\n",
       " 277129: <__main__.user_seq at 0x21900696ef0>,\n",
       " 566363: <__main__.user_seq at 0x21900696f28>,\n",
       " 938471: <__main__.user_seq at 0x21900696f60>,\n",
       " 854397: <__main__.user_seq at 0x21900696f98>,\n",
       " 916651: <__main__.user_seq at 0x21900696fd0>,\n",
       " 563921: <__main__.user_seq at 0x2190069e048>,\n",
       " 834452: <__main__.user_seq at 0x2190069e080>,\n",
       " 73231: <__main__.user_seq at 0x2190069e0b8>,\n",
       " 271320: <__main__.user_seq at 0x2190069e0f0>,\n",
       " 669733: <__main__.user_seq at 0x2190069e128>,\n",
       " 1233955: <__main__.user_seq at 0x2190069e160>,\n",
       " 344986: <__main__.user_seq at 0x2190069e198>,\n",
       " 938665: <__main__.user_seq at 0x2190069e1d0>,\n",
       " 1236803: <__main__.user_seq at 0x2190069e208>,\n",
       " 1351499: <__main__.user_seq at 0x2190069e240>,\n",
       " 637808: <__main__.user_seq at 0x2190069e278>,\n",
       " 293848: <__main__.user_seq at 0x2190069e2b0>,\n",
       " 513125: <__main__.user_seq at 0x2190069e2e8>,\n",
       " 691108: <__main__.user_seq at 0x2190069e320>,\n",
       " 160727: <__main__.user_seq at 0x2190069e358>,\n",
       " 596133: <__main__.user_seq at 0x2190069e390>,\n",
       " 739435: <__main__.user_seq at 0x2190069e3c8>,\n",
       " 896365: <__main__.user_seq at 0x2190069e400>,\n",
       " 637043: <__main__.user_seq at 0x2190069e438>,\n",
       " 1073967: <__main__.user_seq at 0x2190069e470>,\n",
       " 147719: <__main__.user_seq at 0x2190069e4a8>,\n",
       " 1185725: <__main__.user_seq at 0x2190069e4e0>,\n",
       " 96837: <__main__.user_seq at 0x2190069e518>,\n",
       " 936980: <__main__.user_seq at 0x2190069e550>,\n",
       " 504530: <__main__.user_seq at 0x2190069e588>,\n",
       " 1321156: <__main__.user_seq at 0x2190069e5c0>,\n",
       " 1266591: <__main__.user_seq at 0x2190069e5f8>,\n",
       " 439287: <__main__.user_seq at 0x2190069e630>,\n",
       " 1118764: <__main__.user_seq at 0x2190069e668>,\n",
       " 93998: <__main__.user_seq at 0x2190069e6a0>,\n",
       " 970095: <__main__.user_seq at 0x2190069e6d8>,\n",
       " 371858: <__main__.user_seq at 0x2190069e710>,\n",
       " 1066803: <__main__.user_seq at 0x2190069e748>,\n",
       " 1216582: <__main__.user_seq at 0x2190069e780>,\n",
       " 1178385: <__main__.user_seq at 0x2190069e7b8>,\n",
       " 402989: <__main__.user_seq at 0x2190069e7f0>,\n",
       " 355400: <__main__.user_seq at 0x2190069e828>,\n",
       " 871022: <__main__.user_seq at 0x2190069e860>,\n",
       " 243472: <__main__.user_seq at 0x2190069e898>,\n",
       " 1230981: <__main__.user_seq at 0x2190069e8d0>,\n",
       " 1238233: <__main__.user_seq at 0x2190069e908>,\n",
       " 791615: <__main__.user_seq at 0x2190069e940>,\n",
       " 182433: <__main__.user_seq at 0x2190069e978>,\n",
       " 217197: <__main__.user_seq at 0x2190069e9b0>,\n",
       " 1008941: <__main__.user_seq at 0x2190069e9e8>,\n",
       " 993515: <__main__.user_seq at 0x2190069ea20>,\n",
       " 799592: <__main__.user_seq at 0x2190069ea58>,\n",
       " 754235: <__main__.user_seq at 0x2190069ea90>,\n",
       " 337538: <__main__.user_seq at 0x2190069eac8>,\n",
       " 602426: <__main__.user_seq at 0x2190069eb00>,\n",
       " 175900: <__main__.user_seq at 0x2190069eb38>,\n",
       " 320121: <__main__.user_seq at 0x2190069eb70>,\n",
       " 1366497: <__main__.user_seq at 0x2190069eba8>,\n",
       " 543569: <__main__.user_seq at 0x2190069ebe0>,\n",
       " 904710: <__main__.user_seq at 0x2190069ec18>,\n",
       " 203323: <__main__.user_seq at 0x2190069ec50>,\n",
       " 320114: <__main__.user_seq at 0x2190069ec88>,\n",
       " 1191863: <__main__.user_seq at 0x2190069ecc0>,\n",
       " 748064: <__main__.user_seq at 0x2190069ecf8>,\n",
       " 701132: <__main__.user_seq at 0x2190069ed30>,\n",
       " 483305: <__main__.user_seq at 0x2190069ed68>,\n",
       " 1258028: <__main__.user_seq at 0x2190069eda0>,\n",
       " 139133: <__main__.user_seq at 0x2190069edd8>,\n",
       " 550148: <__main__.user_seq at 0x2190069ee10>,\n",
       " 189467: <__main__.user_seq at 0x2190069ee48>,\n",
       " 903667: <__main__.user_seq at 0x2190069ee80>,\n",
       " 1292561: <__main__.user_seq at 0x2190069eeb8>,\n",
       " 170749: <__main__.user_seq at 0x2190069eef0>,\n",
       " 728794: <__main__.user_seq at 0x2190069ef28>,\n",
       " 469140: <__main__.user_seq at 0x2190069ef60>,\n",
       " 1096939: <__main__.user_seq at 0x2190069ef98>,\n",
       " 326478: <__main__.user_seq at 0x2190069efd0>,\n",
       " 835126: <__main__.user_seq at 0x219006a6048>,\n",
       " 820632: <__main__.user_seq at 0x219006a6080>,\n",
       " 646235: <__main__.user_seq at 0x219006a60b8>,\n",
       " 263285: <__main__.user_seq at 0x219006a60f0>,\n",
       " 1144331: <__main__.user_seq at 0x219006a6128>,\n",
       " 453242: <__main__.user_seq at 0x219006a6160>,\n",
       " 99881: <__main__.user_seq at 0x219006a6198>,\n",
       " 917900: <__main__.user_seq at 0x219006a61d0>,\n",
       " 146933: <__main__.user_seq at 0x219006a6208>,\n",
       " 1008924: <__main__.user_seq at 0x219006a6240>,\n",
       " 366221: <__main__.user_seq at 0x219006a6278>,\n",
       " 26106: <__main__.user_seq at 0x219006a62b0>,\n",
       " 783466: <__main__.user_seq at 0x219006a62e8>,\n",
       " 720247: <__main__.user_seq at 0x219006a6320>,\n",
       " 1009437: <__main__.user_seq at 0x219006a6358>,\n",
       " 126280: <__main__.user_seq at 0x219006a6390>,\n",
       " 548663: <__main__.user_seq at 0x219006a63c8>,\n",
       " 285799: <__main__.user_seq at 0x219006a6400>,\n",
       " 1146343: <__main__.user_seq at 0x219006a6438>,\n",
       " 322359: <__main__.user_seq at 0x219006a6470>,\n",
       " 379945: <__main__.user_seq at 0x219006a64a8>,\n",
       " 287052: <__main__.user_seq at 0x219006a64e0>,\n",
       " 738596: <__main__.user_seq at 0x219006a6518>,\n",
       " 171433: <__main__.user_seq at 0x219006a6550>,\n",
       " 506097: <__main__.user_seq at 0x219006a6588>,\n",
       " 318129: <__main__.user_seq at 0x219006a65c0>,\n",
       " 794962: <__main__.user_seq at 0x219006a65f8>,\n",
       " 899174: <__main__.user_seq at 0x219006a6630>,\n",
       " 584395: <__main__.user_seq at 0x219006a6668>,\n",
       " 1225499: <__main__.user_seq at 0x219006a66a0>,\n",
       " 819009: <__main__.user_seq at 0x219006a66d8>,\n",
       " 819371: <__main__.user_seq at 0x219006a6710>,\n",
       " 607333: <__main__.user_seq at 0x219006a6748>,\n",
       " 169942: <__main__.user_seq at 0x219006a6780>,\n",
       " 118708: <__main__.user_seq at 0x219006a67b8>,\n",
       " 841440: <__main__.user_seq at 0x219006a67f0>,\n",
       " 746589: <__main__.user_seq at 0x219006a6828>,\n",
       " 1266013: <__main__.user_seq at 0x219006a6860>,\n",
       " 238690: <__main__.user_seq at 0x219006a6898>,\n",
       " 558047: <__main__.user_seq at 0x219006a68d0>,\n",
       " 32126: <__main__.user_seq at 0x219006a6908>,\n",
       " 950570: <__main__.user_seq at 0x219006a6940>,\n",
       " 744971: <__main__.user_seq at 0x219006a6978>,\n",
       " 1294524: <__main__.user_seq at 0x219006a69b0>,\n",
       " 1273091: <__main__.user_seq at 0x219006a69e8>,\n",
       " 1261332: <__main__.user_seq at 0x219006a6a20>,\n",
       " 358867: <__main__.user_seq at 0x219006a6a58>,\n",
       " 1262509: <__main__.user_seq at 0x219006a6a90>,\n",
       " 838473: <__main__.user_seq at 0x219006a6ac8>,\n",
       " 1252224: <__main__.user_seq at 0x219006a6b00>,\n",
       " 462174: <__main__.user_seq at 0x219006a6b38>,\n",
       " 5056: <__main__.user_seq at 0x219006a6b70>,\n",
       " 51910: <__main__.user_seq at 0x219006a6ba8>,\n",
       " 965592: <__main__.user_seq at 0x219006a6be0>,\n",
       " 1018683: <__main__.user_seq at 0x219006a6c18>,\n",
       " 1161820: <__main__.user_seq at 0x219006a6c50>,\n",
       " 354821: <__main__.user_seq at 0x219006a6c88>,\n",
       " 759052: <__main__.user_seq at 0x219006a6cc0>,\n",
       " 194275: <__main__.user_seq at 0x219006a6cf8>,\n",
       " 734052: <__main__.user_seq at 0x219006a6d30>,\n",
       " 1282607: <__main__.user_seq at 0x219006a6d68>,\n",
       " 731186: <__main__.user_seq at 0x219006a6da0>,\n",
       " 180069: <__main__.user_seq at 0x219006a6dd8>,\n",
       " 1612: <__main__.user_seq at 0x219006a6e10>,\n",
       " 538044: <__main__.user_seq at 0x219006a6e48>,\n",
       " 990035: <__main__.user_seq at 0x219006a6e80>,\n",
       " 1361368: <__main__.user_seq at 0x219006a6eb8>,\n",
       " 1350457: <__main__.user_seq at 0x219006a6ef0>,\n",
       " 821746: <__main__.user_seq at 0x219006a6f28>,\n",
       " 1229775: <__main__.user_seq at 0x219006a6f60>,\n",
       " 476429: <__main__.user_seq at 0x219006a6f98>,\n",
       " 1240125: <__main__.user_seq at 0x219006a6fd0>,\n",
       " 148191: <__main__.user_seq at 0x219006ad048>,\n",
       " 696436: <__main__.user_seq at 0x219006ad080>,\n",
       " 624782: <__main__.user_seq at 0x219006ad0b8>,\n",
       " 794136: <__main__.user_seq at 0x219006ad0f0>,\n",
       " 670956: <__main__.user_seq at 0x219006ad128>,\n",
       " 875266: <__main__.user_seq at 0x219006ad160>,\n",
       " 455070: <__main__.user_seq at 0x219006ad198>,\n",
       " 1024564: <__main__.user_seq at 0x219006ad1d0>,\n",
       " 739124: <__main__.user_seq at 0x219006ad208>,\n",
       " 1015886: <__main__.user_seq at 0x219006ad240>,\n",
       " 100432: <__main__.user_seq at 0x219006ad278>,\n",
       " 1073521: <__main__.user_seq at 0x219006ad2b0>,\n",
       " 285446: <__main__.user_seq at 0x219006ad2e8>,\n",
       " 976386: <__main__.user_seq at 0x219006ad320>,\n",
       " 1123452: <__main__.user_seq at 0x219006ad358>,\n",
       " 329870: <__main__.user_seq at 0x219006ad390>,\n",
       " 935560: <__main__.user_seq at 0x219006ad3c8>,\n",
       " 401245: <__main__.user_seq at 0x219006ad400>,\n",
       " 646421: <__main__.user_seq at 0x219006ad438>,\n",
       " 1309442: <__main__.user_seq at 0x219006ad470>,\n",
       " 1171857: <__main__.user_seq at 0x219006ad4a8>,\n",
       " 777171: <__main__.user_seq at 0x219006ad4e0>,\n",
       " 1081214: <__main__.user_seq at 0x219006ad518>,\n",
       " 929657: <__main__.user_seq at 0x219006ad550>,\n",
       " 928415: <__main__.user_seq at 0x219006ad588>,\n",
       " 467108: <__main__.user_seq at 0x219006ad5c0>,\n",
       " 889728: <__main__.user_seq at 0x219006ad5f8>,\n",
       " 1365989: <__main__.user_seq at 0x219006ad630>,\n",
       " 1253679: <__main__.user_seq at 0x219006ad668>,\n",
       " 684069: <__main__.user_seq at 0x219006ad6a0>,\n",
       " 291697: <__main__.user_seq at 0x219006ad6d8>,\n",
       " 216546: <__main__.user_seq at 0x219006ad710>,\n",
       " 654073: <__main__.user_seq at 0x219006ad748>,\n",
       " 1080425: <__main__.user_seq at 0x219006ad780>,\n",
       " 340634: <__main__.user_seq at 0x219006ad7b8>,\n",
       " 1034050: <__main__.user_seq at 0x219006ad7f0>,\n",
       " 1206065: <__main__.user_seq at 0x219006ad828>,\n",
       " 715325: <__main__.user_seq at 0x219006ad860>,\n",
       " 803748: <__main__.user_seq at 0x219006ad898>,\n",
       " 1095295: <__main__.user_seq at 0x219006ad8d0>,\n",
       " 1171136: <__main__.user_seq at 0x219006ad908>,\n",
       " 1294875: <__main__.user_seq at 0x219006ad940>,\n",
       " 980295: <__main__.user_seq at 0x219006ad978>,\n",
       " 750139: <__main__.user_seq at 0x219006ad9b0>,\n",
       " 68475: <__main__.user_seq at 0x219006ad9e8>,\n",
       " 222996: <__main__.user_seq at 0x219006ada20>,\n",
       " 258831: <__main__.user_seq at 0x219006ada58>,\n",
       " 1117558: <__main__.user_seq at 0x219006ada90>,\n",
       " 953680: <__main__.user_seq at 0x219006adac8>,\n",
       " 356930: <__main__.user_seq at 0x219006adb00>,\n",
       " 719748: <__main__.user_seq at 0x219006adb38>,\n",
       " 678792: <__main__.user_seq at 0x219006adb70>,\n",
       " 37907: <__main__.user_seq at 0x219006adba8>,\n",
       " 862097: <__main__.user_seq at 0x219006adbe0>,\n",
       " 125349: <__main__.user_seq at 0x219006adc18>,\n",
       " 1048727: <__main__.user_seq at 0x219006adc50>,\n",
       " 590118: <__main__.user_seq at 0x219006adc88>,\n",
       " 311082: <__main__.user_seq at 0x219006adcc0>,\n",
       " 328673: <__main__.user_seq at 0x219006adcf8>,\n",
       " 169455: <__main__.user_seq at 0x219006add30>,\n",
       " 708695: <__main__.user_seq at 0x219006add68>,\n",
       " 89810: <__main__.user_seq at 0x219006adda0>,\n",
       " 1086097: <__main__.user_seq at 0x219006addd8>,\n",
       " 119421: <__main__.user_seq at 0x219006ade10>,\n",
       " 1126462: <__main__.user_seq at 0x219006ade48>,\n",
       " 910723: <__main__.user_seq at 0x219006ade80>,\n",
       " 717448: <__main__.user_seq at 0x219006adeb8>,\n",
       " 776280: <__main__.user_seq at 0x219006adef0>,\n",
       " 1095113: <__main__.user_seq at 0x219006adf28>,\n",
       " 375128: <__main__.user_seq at 0x219006adf60>,\n",
       " 1331639: <__main__.user_seq at 0x219006adf98>,\n",
       " 1312462: <__main__.user_seq at 0x219006adfd0>,\n",
       " 277225: <__main__.user_seq at 0x219006b3048>,\n",
       " 746631: <__main__.user_seq at 0x219006b3080>,\n",
       " 419675: <__main__.user_seq at 0x219006b30b8>,\n",
       " 426036: <__main__.user_seq at 0x219006b30f0>,\n",
       " 23027: <__main__.user_seq at 0x219006b3128>,\n",
       " 1305495: <__main__.user_seq at 0x219006b3160>,\n",
       " 688262: <__main__.user_seq at 0x219006b3198>,\n",
       " 1163490: <__main__.user_seq at 0x219006b31d0>,\n",
       " 1024243: <__main__.user_seq at 0x219006b3208>,\n",
       " 958485: <__main__.user_seq at 0x219006b3240>,\n",
       " 130605: <__main__.user_seq at 0x219006b3278>,\n",
       " 340616: <__main__.user_seq at 0x219006b32b0>,\n",
       " 670827: <__main__.user_seq at 0x219006b32e8>,\n",
       " 1140404: <__main__.user_seq at 0x219006b3320>,\n",
       " 324234: <__main__.user_seq at 0x219006b3358>,\n",
       " 420165: <__main__.user_seq at 0x219006b3390>,\n",
       " 1331533: <__main__.user_seq at 0x219006b33c8>,\n",
       " 1300003: <__main__.user_seq at 0x219006b3400>,\n",
       " 482733: <__main__.user_seq at 0x219006b3438>,\n",
       " 952712: <__main__.user_seq at 0x219006b3470>,\n",
       " 994435: <__main__.user_seq at 0x219006b34a8>,\n",
       " 212349: <__main__.user_seq at 0x219006b34e0>,\n",
       " 1349346: <__main__.user_seq at 0x219006b3518>,\n",
       " 867882: <__main__.user_seq at 0x219006b3550>,\n",
       " 425668: <__main__.user_seq at 0x219006b3588>,\n",
       " 603789: <__main__.user_seq at 0x219006b35c0>,\n",
       " 1036164: <__main__.user_seq at 0x219006b35f8>,\n",
       " 1045485: <__main__.user_seq at 0x219006b3630>,\n",
       " 1215537: <__main__.user_seq at 0x219006b3668>,\n",
       " 1074206: <__main__.user_seq at 0x219006b36a0>,\n",
       " 51558: <__main__.user_seq at 0x219006b36d8>,\n",
       " 206513: <__main__.user_seq at 0x219006b3710>,\n",
       " 1097462: <__main__.user_seq at 0x219006b3748>,\n",
       " 740763: <__main__.user_seq at 0x219006b3780>,\n",
       " 254971: <__main__.user_seq at 0x219006b37b8>,\n",
       " 817716: <__main__.user_seq at 0x219006b37f0>,\n",
       " 520613: <__main__.user_seq at 0x219006b3828>,\n",
       " 637590: <__main__.user_seq at 0x219006b3860>,\n",
       " 160775: <__main__.user_seq at 0x219006b3898>,\n",
       " 155381: <__main__.user_seq at 0x219006b38d0>,\n",
       " 236360: <__main__.user_seq at 0x219006b3908>,\n",
       " 473209: <__main__.user_seq at 0x219006b3940>,\n",
       " 91356: <__main__.user_seq at 0x219006b3978>,\n",
       " 393059: <__main__.user_seq at 0x219006b39b0>,\n",
       " 439146: <__main__.user_seq at 0x219006b39e8>,\n",
       " 956525: <__main__.user_seq at 0x219006b3a20>,\n",
       " 49020: <__main__.user_seq at 0x219006b3a58>,\n",
       " 1306827: <__main__.user_seq at 0x219006b3a90>,\n",
       " 1198470: <__main__.user_seq at 0x219006b3ac8>,\n",
       " 857247: <__main__.user_seq at 0x219006b3b00>,\n",
       " 316571: <__main__.user_seq at 0x219006b3b38>,\n",
       " 548906: <__main__.user_seq at 0x219006b3b70>,\n",
       " 102795: <__main__.user_seq at 0x219006b3ba8>,\n",
       " 595835: <__main__.user_seq at 0x219006b3be0>,\n",
       " 1091799: <__main__.user_seq at 0x219006b3c18>,\n",
       " 394049: <__main__.user_seq at 0x219006b3c50>,\n",
       " 773358: <__main__.user_seq at 0x219006b3c88>,\n",
       " 318109: <__main__.user_seq at 0x219006b3cc0>,\n",
       " 291352: <__main__.user_seq at 0x219006b3cf8>,\n",
       " 1178849: <__main__.user_seq at 0x219006b3d30>,\n",
       " 651257: <__main__.user_seq at 0x219006b3d68>,\n",
       " 445835: <__main__.user_seq at 0x219006b3da0>,\n",
       " 1144351: <__main__.user_seq at 0x219006b3dd8>,\n",
       " 773513: <__main__.user_seq at 0x219006b3e10>,\n",
       " 485725: <__main__.user_seq at 0x219006b3e48>,\n",
       " 1011726: <__main__.user_seq at 0x219006b3e80>,\n",
       " 1209968: <__main__.user_seq at 0x219006b3eb8>,\n",
       " 435886: <__main__.user_seq at 0x219006b3ef0>,\n",
       " 465038: <__main__.user_seq at 0x219006b3f28>,\n",
       " 627033: <__main__.user_seq at 0x219006b3f60>,\n",
       " 1247690: <__main__.user_seq at 0x219006b3f98>,\n",
       " 763791: <__main__.user_seq at 0x219006b3fd0>,\n",
       " 184855: <__main__.user_seq at 0x219006bc048>,\n",
       " 895542: <__main__.user_seq at 0x219006bc080>,\n",
       " 1006389: <__main__.user_seq at 0x219006bc0b8>,\n",
       " 265351: <__main__.user_seq at 0x219006bc0f0>,\n",
       " 402729: <__main__.user_seq at 0x219006bc128>,\n",
       " 23259: <__main__.user_seq at 0x219006bc160>,\n",
       " 81997: <__main__.user_seq at 0x219006bc198>,\n",
       " 165142: <__main__.user_seq at 0x219006bc1d0>,\n",
       " 688755: <__main__.user_seq at 0x219006bc208>,\n",
       " 476719: <__main__.user_seq at 0x219006bc240>,\n",
       " 926677: <__main__.user_seq at 0x219006bc278>,\n",
       " 318136: <__main__.user_seq at 0x219006bc2b0>,\n",
       " 484341: <__main__.user_seq at 0x219006bc2e8>,\n",
       " 795340: <__main__.user_seq at 0x219006bc320>,\n",
       " 588192: <__main__.user_seq at 0x219006bc358>,\n",
       " 1332698: <__main__.user_seq at 0x219006bc390>,\n",
       " 530363: <__main__.user_seq at 0x219006bc3c8>,\n",
       " 1150284: <__main__.user_seq at 0x219006bc400>,\n",
       " 1298178: <__main__.user_seq at 0x219006bc438>,\n",
       " 1166570: <__main__.user_seq at 0x219006bc470>,\n",
       " 840265: <__main__.user_seq at 0x219006bc4a8>,\n",
       " 1336125: <__main__.user_seq at 0x219006bc4e0>,\n",
       " 663133: <__main__.user_seq at 0x219006bc518>,\n",
       " 914208: <__main__.user_seq at 0x219006bc550>,\n",
       " 643951: <__main__.user_seq at 0x219006bc588>,\n",
       " 624118: <__main__.user_seq at 0x219006bc5c0>,\n",
       " 493038: <__main__.user_seq at 0x219006bc5f8>,\n",
       " 7746: <__main__.user_seq at 0x219006bc630>,\n",
       " 946860: <__main__.user_seq at 0x219006bc668>,\n",
       " 446560: <__main__.user_seq at 0x219006bc6a0>,\n",
       " 1279469: <__main__.user_seq at 0x219006bc6d8>,\n",
       " 928783: <__main__.user_seq at 0x219006bc710>,\n",
       " 471519: <__main__.user_seq at 0x219006bc748>,\n",
       " 1204978: <__main__.user_seq at 0x219006bc780>,\n",
       " 1215838: <__main__.user_seq at 0x219006bc7b8>,\n",
       " 1150480: <__main__.user_seq at 0x219006bc7f0>,\n",
       " 884245: <__main__.user_seq at 0x219006bc828>,\n",
       " 798951: <__main__.user_seq at 0x219006bc860>,\n",
       " 801040: <__main__.user_seq at 0x219006bc898>,\n",
       " 711794: <__main__.user_seq at 0x219006bc8d0>,\n",
       " 494610: <__main__.user_seq at 0x219006bc908>,\n",
       " 210948: <__main__.user_seq at 0x219006bc940>,\n",
       " 1150289: <__main__.user_seq at 0x219006bc978>,\n",
       " 758161: <__main__.user_seq at 0x219006bc9b0>,\n",
       " 136101: <__main__.user_seq at 0x219006bc9e8>,\n",
       " 1263601: <__main__.user_seq at 0x219006bca20>,\n",
       " 1281769: <__main__.user_seq at 0x219006bca58>,\n",
       " 842085: <__main__.user_seq at 0x219006bca90>,\n",
       " 740431: <__main__.user_seq at 0x219006bcac8>,\n",
       " 380179: <__main__.user_seq at 0x219006bcb00>,\n",
       " 796523: <__main__.user_seq at 0x219006bcb38>,\n",
       " 894761: <__main__.user_seq at 0x219006bcb70>,\n",
       " 96724: <__main__.user_seq at 0x219006bcba8>,\n",
       " 1343616: <__main__.user_seq at 0x219006bcbe0>,\n",
       " 88701: <__main__.user_seq at 0x219006bcc18>,\n",
       " 705708: <__main__.user_seq at 0x219006bcc50>,\n",
       " 811533: <__main__.user_seq at 0x219006bcc88>,\n",
       " 1191205: <__main__.user_seq at 0x219006bccc0>,\n",
       " 3688: <__main__.user_seq at 0x219006bccf8>,\n",
       " 955495: <__main__.user_seq at 0x219006bcd30>,\n",
       " 78691: <__main__.user_seq at 0x219006bcd68>,\n",
       " 1138742: <__main__.user_seq at 0x219006bcda0>,\n",
       " 836024: <__main__.user_seq at 0x219006bcdd8>,\n",
       " 309602: <__main__.user_seq at 0x219006bce10>,\n",
       " 8766: <__main__.user_seq at 0x219006bce48>,\n",
       " 1086210: <__main__.user_seq at 0x219006bce80>,\n",
       " 490240: <__main__.user_seq at 0x219006bceb8>,\n",
       " 459936: <__main__.user_seq at 0x219006bcef0>,\n",
       " 56949: <__main__.user_seq at 0x219006bcf28>,\n",
       " 319655: <__main__.user_seq at 0x219006bcf60>,\n",
       " 277518: <__main__.user_seq at 0x219006bcf98>,\n",
       " 732418: <__main__.user_seq at 0x219006bcfd0>,\n",
       " 633415: <__main__.user_seq at 0x219006c2048>,\n",
       " 1032836: <__main__.user_seq at 0x219006c2080>,\n",
       " 1129480: <__main__.user_seq at 0x219006c20b8>,\n",
       " 215150: <__main__.user_seq at 0x219006c20f0>,\n",
       " 1030103: <__main__.user_seq at 0x219006c2128>,\n",
       " 10281: <__main__.user_seq at 0x219006c2160>,\n",
       " 1254525: <__main__.user_seq at 0x219006c2198>,\n",
       " 869277: <__main__.user_seq at 0x219006c21d0>,\n",
       " 746569: <__main__.user_seq at 0x219006c2208>,\n",
       " 67119: <__main__.user_seq at 0x219006c2240>,\n",
       " 973428: <__main__.user_seq at 0x219006c2278>,\n",
       " 786824: <__main__.user_seq at 0x219006c22b0>,\n",
       " 1111731: <__main__.user_seq at 0x219006c22e8>,\n",
       " 1202073: <__main__.user_seq at 0x219006c2320>,\n",
       " 605164: <__main__.user_seq at 0x219006c2358>,\n",
       " 581368: <__main__.user_seq at 0x219006c2390>,\n",
       " 1300636: <__main__.user_seq at 0x219006c23c8>,\n",
       " 1035207: <__main__.user_seq at 0x219006c2400>,\n",
       " 844492: <__main__.user_seq at 0x219006c2438>,\n",
       " 19167: <__main__.user_seq at 0x219006c2470>,\n",
       " 803970: <__main__.user_seq at 0x219006c24a8>,\n",
       " 573512: <__main__.user_seq at 0x219006c24e0>,\n",
       " 868765: <__main__.user_seq at 0x219006c2518>,\n",
       " 433408: <__main__.user_seq at 0x219006c2550>,\n",
       " 772261: <__main__.user_seq at 0x219006c2588>,\n",
       " 484035: <__main__.user_seq at 0x219006c25c0>,\n",
       " 593613: <__main__.user_seq at 0x219006c25f8>,\n",
       " 675854: <__main__.user_seq at 0x219006c2630>,\n",
       " 860938: <__main__.user_seq at 0x219006c2668>,\n",
       " 1080025: <__main__.user_seq at 0x219006c26a0>,\n",
       " 1227975: <__main__.user_seq at 0x219006c26d8>,\n",
       " 1217923: <__main__.user_seq at 0x219006c2710>,\n",
       " 781337: <__main__.user_seq at 0x219006c2748>,\n",
       " 766355: <__main__.user_seq at 0x219006c2780>,\n",
       " 1011370: <__main__.user_seq at 0x219006c27b8>,\n",
       " 1043386: <__main__.user_seq at 0x219006c27f0>,\n",
       " 1314034: <__main__.user_seq at 0x219006c2828>,\n",
       " 1359018: <__main__.user_seq at 0x219006c2860>,\n",
       " 337372: <__main__.user_seq at 0x219006c2898>,\n",
       " 967286: <__main__.user_seq at 0x219006c28d0>,\n",
       " 381644: <__main__.user_seq at 0x219006c2908>,\n",
       " 1167296: <__main__.user_seq at 0x219006c2940>,\n",
       " 1318762: <__main__.user_seq at 0x219006c2978>,\n",
       " 359954: <__main__.user_seq at 0x219006c29b0>,\n",
       " 686230: <__main__.user_seq at 0x219006c29e8>,\n",
       " 480465: <__main__.user_seq at 0x219006c2a20>,\n",
       " ...}"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 这样就得到了每个用户的初始特征表\n",
    "data"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 然后，就是从数据表中提出相应的信息，填入特征矩阵\n",
    "这一块，我们基于之前的数据表提取特征了，也是分为这几块提取\n",
    "* 用户的登录信息特征(launch表)\n",
    "* 用户创作视频的信息特征(create表)\n",
    "* 用户使用时的行为特征，例如点赞，转发等（activity表的act_type）\n",
    "* 用户产生行为的界面信息特征(activity表的page字段)\n",
    "* 用户观看其他用户的行为特征(activity表的author_id字段 != user_id)\n",
    "* 观看自己作品的行为特征(activity表的author_id字段 == user_id)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 用户的登录信息特征 （是否在某天登录过）- launch表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:31:00.220690Z",
     "start_time": "2020-03-06T00:31:00.214662Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>launch_day</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>383135</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>330986</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>330986</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>330986</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>330986</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   user_id  launch_day\n",
       "0   383135           1\n",
       "1   330986           4\n",
       "2   330986           9\n",
       "3   330986          11\n",
       "4   330986          12"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 看看launch表长啥样来\n",
    "launch.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:40:17.409691Z",
     "start_time": "2020-03-06T00:40:17.268025Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>launch_day</th>\n",
       "      <th>launch_freq</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>16</td>\n",
       "      <td>13</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>16</td>\n",
       "      <td>14</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>16</td>\n",
       "      <td>15</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>16</td>\n",
       "      <td>18</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>16</td>\n",
       "      <td>19</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   user_id  launch_day  launch_freq\n",
       "0       16          13            1\n",
       "1       16          14            1\n",
       "2       16          15            1\n",
       "3       16          18            1\n",
       "4       16          19            1"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "launch['launch_freq'] = 1    # 每个用户每天登录次数\n",
    "launch_table = launch.groupby(['user_id', 'launch_day'], as_index=False).agg({'launch_freq':'sum'})\n",
    "launch_table.head()\n",
    "# 如果这里的as_index为true， 那么这里的索引就自动变成第一列，也就是user_id，这五个会用共同的索引。  如果是False，那就是SQL风格的输出"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:40:19.059262Z",
     "start_time": "2020-03-06T00:40:19.054276Z"
    }
   },
   "outputs": [],
   "source": [
    "# 然后得根据用户的id进行整合一下，把相同用户的结果放在一块\n",
    "def record_to_sequence(table):    # 得到用户特征序列表\n",
    "    table.columns = ['user_id', 'day', 'value']\n",
    "    table.sort_values(by=['user_id', 'day'], inplace=True)\n",
    "    table['string'] = table.day.map(str) + \":\" + table.value.map(str)\n",
    "    table = table.groupby(['user_id'], as_index=False).agg({'string':lambda x:','.join(x)})\n",
    "    return table"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:40:21.030994Z",
     "start_time": "2020-03-06T00:40:20.118431Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>string</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>16</td>\n",
       "      <td>13:1,14:1,15:1,18:1,19:1,20:1,21:1,22:1,23:1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>30</td>\n",
       "      <td>24:1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>98</td>\n",
       "      <td>16:1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>105</td>\n",
       "      <td>12:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,2...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>176</td>\n",
       "      <td>27:1,28:1,29:1,30:1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   user_id                                             string\n",
       "0       16       13:1,14:1,15:1,18:1,19:1,20:1,21:1,22:1,23:1\n",
       "1       30                                               24:1\n",
       "2       98                                               16:1\n",
       "3      105  12:1,14:1,15:1,16:1,17:1,18:1,19:1,20:1,21:1,2...\n",
       "4      176                                27:1,28:1,29:1,30:1"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "launch_table = record_to_sequence(launch_table)\n",
    "launch_table.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:40:28.966673Z",
     "start_time": "2020-03-06T00:40:23.374412Z"
    }
   },
   "outputs": [],
   "source": [
    "\"\"\"然后我们把用户的登录信息填入到特征矩阵，是否登录的信息是第1列特征\"\"\"\n",
    "# 例如ID=16的用户会在其特征表的指定位置的（13,14,15,18...行第1列进行填充）\n",
    "for index, row in launch_table.iterrows():   # 根据登录信息对用户特征表进行填充\n",
    "    data[row[0]].put_feature(0, row[1])      # row[0]就是用户ID， data[row[0]]就是用户对应的特征表，用put_feature函数将row[1],填入到第一列中"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 创作视频的特征（是否在某天创建过视频） - create表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:31:23.094679Z",
     "start_time": "2020-03-06T00:31:23.087697Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>create_day</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>720497</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>720497</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>720497</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1075211</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1075211</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   user_id  create_day\n",
       "0   720497           1\n",
       "1   720497           1\n",
       "2   720497           1\n",
       "3  1075211           6\n",
       "4  1075211          12"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 先看一下那个表的信息\n",
    "create.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:40:32.035582Z",
     "start_time": "2020-03-06T00:40:31.094061Z"
    }
   },
   "outputs": [],
   "source": [
    "# 这个和上面的思路差不多，也是先进行统计，然后整合填充到第2列的特征\n",
    "create['create_freq'] = 1\n",
    "create_table = create.groupby(['user_id', 'create_day'], as_index=False).agg({'create_freq':'sum'})\n",
    "create_table = record_to_sequence(create_table)\n",
    "for index, row in create_table.iterrows():\n",
    "    data[row[0]].put_feature(1, row[1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 用户使用时的行为特征(activity表的act_type字段)\n",
    "这一块根据是否有act_type字段的六种行为（播放，关注，点赞，转发，举报，减少此类作品）可以做出6个特征"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:40:35.545034Z",
     "start_time": "2020-03-06T00:40:34.126826Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{0, 1, 2, 3, 4}"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 看一下表中的信息\n",
    "activity.head()\n",
    "set(activity['page'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:40:52.241983Z",
     "start_time": "2020-03-06T00:40:36.310717Z"
    }
   },
   "outputs": [],
   "source": [
    "\"\"\"这里使用的act_type字段，对于不同的行为，制作不同的特征，构建6个特征\"\"\"\n",
    "for i in range(6):\n",
    "    act_table = activity[activity.act_type==i].copy()    # 这个地方要深复制一下，不要动用原来的表\n",
    "    act_table = act_table.groupby(['user_id', 'act_day'], as_index=False).agg({'video_id':'count'})\n",
    "    act_table = record_to_sequence(act_table)\n",
    "    for index, row in act_table.iterrows():\n",
    "        data[row[0]].put_feature(i+2, row[1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 用户产生行为的界面信息特征(activity表的page字段)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:41:20.215508Z",
     "start_time": "2020-03-06T00:41:00.846041Z"
    }
   },
   "outputs": [],
   "source": [
    " for i in range(5):     \n",
    "    act = activity[activity.page==i].copy()\n",
    "    act = act.groupby(['user_id', 'act_day'], as_index=False).agg({'video_id':'count'})\n",
    "    act = record_to_sequence(act)\n",
    "    for index, row in act.iterrows():\n",
    "        data[row[0]].put_feature(i+8, row[1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 用户观看其他用户的行为特征(activity表的author_id字段 != user_id)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:41:24.173750Z",
     "start_time": "2020-03-06T00:41:21.631422Z"
    }
   },
   "outputs": [],
   "source": [
    "watched = register.loc[:, ['user_id']].copy()\n",
    "watched.columns = ['author_id']\n",
    "watched = pd.merge(watched, activity[activity.author_id != activity.user_id], how='inner')  # 只得到交集 相当于看别人视频的\n",
    "watched = watched.groupby(['user_id', 'act_day'], as_index=False).agg({'video_id':'count'})\n",
    "watched = record_to_sequence(watched)\n",
    "for index, row in watched.iterrows():\n",
    "    data[row[0]].put_feature(13, row[1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "##### 观看自己作品的行为特征(activity表的author_id字段 == user_id)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:41:27.627375Z",
     "start_time": "2020-03-06T00:41:26.669895Z"
    }
   },
   "outputs": [],
   "source": [
    "watched = activity[activity.author_id == activity.user_id].copy()\n",
    "watched = watched.groupby(['user_id', 'act_day'], as_index=False).agg({'video_id':'count'})\n",
    "watched = record_to_sequence(watched)\n",
    "for index, row in watched.iterrows():\n",
    "    data[row[0]].put_feature(14, row[1])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 制作数据标签\n",
    "通过上面的操作，我们就构建好了神经网络的输入，当然这里这样构建特征是为神经网络服务的，如果是想用机器学习的一些方式，就可以提取一些统计的特征，比如平均值，方差，中位数的这些东西用xgb什么的跑，但是这种时间之间的特征可能就捕捉不到了。<br><br>\n",
    "下面，我们就是制作数据的标签了： 在未来七天内是否会使用APP， 这个的思路就是对用户从注册开始就进行统计，对于每1天的数据展开，如果其未来七天内这个用户活跃过，就标记为1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:41:32.518633Z",
     "start_time": "2020-03-06T00:41:29.649088Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{744025: array([1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1270299: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 571220: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1308501: array([1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 745554: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1031012: array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 913297: array([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 266500: array([1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 475120: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 547944: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 916655: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 719262: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1026175: array([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1140342: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 688100: array([0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1342459: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 926263: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 40710: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 246954: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 153579: array([0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 161418: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 649526: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 376694: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1265894: array([1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 290029: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 926952: array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 70931: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 319938: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 711107: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 872383: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 324085: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 720967: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 895912: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 396421: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 605799: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 374225: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 188120: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 4416: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 245385: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 1244564: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 321610: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 998568: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 362447: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 508312: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 828824: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 604296: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1040779: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 104515: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 909345: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 584573: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 809615: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 705594: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 544673: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1353252: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1228936: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 130304: array([1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 636433: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 649913: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 300198: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 958588: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 365947: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 546663: array([0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 358836: array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 572651: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 200677: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 121072: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 283372: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1046808: array([1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 286389: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 785752: array([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 65439: array([1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1070734: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 409296: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 507130: array([1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 46089: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 363195: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 826213: array([0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1095380: array([0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 742578: array([1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 278433: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 323276: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1080404: array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 371793: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 581535: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 623713: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 613814: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1230657: array([1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 181217: array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 393403: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 647111: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 301007: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1720: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 135240: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1005097: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1265157: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 422203: array([0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 491162: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 392276: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1119103: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 493601: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 987199: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 428929: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 764894: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 901027: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 716335: array([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1132054: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1201394: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 79180: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 363940: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1171561: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 29588: array([0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 225105: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 479488: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1349377: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 755950: array([0, 1, 1, 1, 1, 1, 1, 1, 1, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 867067: array([0, 1, 1, 1, 1, 1, 1, 1, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1208320: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 644685: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 580269: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1278006: array([1, 0, 0, 0, 0, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 900759: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 301088: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 846124: array([1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 873341: array([1, 1, 1, 1, 1, 1, 1, 1, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 373134: array([0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 547864: array([1, 1, 1, 1, 1, 1, 0, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1145926: array([1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 741300: array([0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 685607: array([1, 1, 1, 1, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1096768: array([1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 544078: array([1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 500537: array([0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1126528: array([1, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 470633: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1260044: array([1, 1, 1, 1, 1, 1, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1147129: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 708206: array([0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 578505: array([1, 1, 1, 1, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 473398: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 805787: array([0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 905493: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 706631: array([1, 1, 1, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 875685: array([1, 1, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 969252: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 24482: array([1, 1, 1, 1, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 935166: array([0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1316877: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1163109: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 657176: array([1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1024790: array([0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1216256: array([1, 1, 1, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 908794: array([1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 154609: array([0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1283254: array([1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 498488: array([1, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 969395: array([1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 64315: array([1, 1, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 354563: array([0, 0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1356592: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 706245: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 173080: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 315508: array([0, 0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 889586: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 932852: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 196795: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 700459: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 784518: array([1, 1, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1149160: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 251319: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 526703: array([1, 1, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 320032: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 119327: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 627445: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1333459: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 588012: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 12034: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 146820: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1243074: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 271512: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1257585: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1124798: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 82342: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1045093: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1087280: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 182906: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 934918: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 856907: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 564522: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 889866: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 986839: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 551821: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 988294: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1022936: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 349043: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1010794: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1274576: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 109973: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 134299: array([0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1005835: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 864582: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1293122: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 896835: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 630631: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1121791: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1038314: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 123473: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 916883: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 627561: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 1343228: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 1134049: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 1097140: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 192598: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 1084176: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 699788: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 1206272: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 1357808: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 879812: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 178800: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 6142: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 744006: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 498016: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 603422: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 817397: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 279797: array([None, None, None, None, None, None], dtype=object),\n",
       " 42931: array([None, None, None, None, None, None], dtype=object),\n",
       " 477509: array([None, None, None, None, None, None], dtype=object),\n",
       " 768177: array([None, None, None, None, None, None], dtype=object),\n",
       " 1275284: array([None, None, None, None, None, None], dtype=object),\n",
       " 844601: array([None, None, None, None, None, None], dtype=object),\n",
       " 82524: array([None, None, None, None, None], dtype=object),\n",
       " 73158: array([None, None, None, None, None], dtype=object),\n",
       " 1139294: array([None, None, None, None, None], dtype=object),\n",
       " 1102709: array([None, None, None, None, None], dtype=object),\n",
       " 52918: array([None, None, None, None, None], dtype=object),\n",
       " 85132: array([None, None, None, None, None], dtype=object),\n",
       " 23948: array([None, None, None, None, None], dtype=object),\n",
       " 201951: array([None, None, None, None, None], dtype=object),\n",
       " 343886: array([None, None, None, None], dtype=object),\n",
       " 671062: array([None, None, None, None], dtype=object),\n",
       " 1039738: array([None, None, None, None], dtype=object),\n",
       " 310025: array([None, None, None, None], dtype=object),\n",
       " 1266850: array([None, None, None, None], dtype=object),\n",
       " 590886: array([None, None, None, None], dtype=object),\n",
       " 942055: array([None, None, None, None], dtype=object),\n",
       " 694183: array([None, None, None, None], dtype=object),\n",
       " 1302790: array([None, None, None, None], dtype=object),\n",
       " 1352813: array([None, None, None], dtype=object),\n",
       " 219457: array([None, None, None], dtype=object),\n",
       " 1273778: array([None, None, None], dtype=object),\n",
       " 615136: array([None, None, None], dtype=object),\n",
       " 692306: array([None, None, None], dtype=object),\n",
       " 234824: array([None, None, None], dtype=object),\n",
       " 797113: array([None, None, None], dtype=object),\n",
       " 1168061: array([None, None, None], dtype=object),\n",
       " 933116: array([None, None], dtype=object),\n",
       " 675189: array([None, None], dtype=object),\n",
       " 117234: array([None, None], dtype=object),\n",
       " 473215: array([None, None], dtype=object),\n",
       " 693597: array([None, None], dtype=object),\n",
       " 292217: array([None, None], dtype=object),\n",
       " 318189: array([None, None], dtype=object),\n",
       " 893024: array([None, None], dtype=object),\n",
       " 1147778: array([None, None], dtype=object),\n",
       " 75464: array([None, None], dtype=object),\n",
       " 355948: array([None], dtype=object),\n",
       " 1141243: array([None], dtype=object),\n",
       " 885314: array([None], dtype=object),\n",
       " 473037: array([None], dtype=object),\n",
       " 1161976: array([None], dtype=object),\n",
       " 1105249: array([None], dtype=object),\n",
       " 1034711: array([None], dtype=object),\n",
       " 444663: array([None], dtype=object),\n",
       " 629789: array([None], dtype=object),\n",
       " 684292: array([None], dtype=object),\n",
       " 1220188: array([None], dtype=object),\n",
       " 38479: array([None], dtype=object),\n",
       " 1166260: array([None], dtype=object),\n",
       " 739798: array([None], dtype=object),\n",
       " 1023596: array([None], dtype=object),\n",
       " 731282: array([None], dtype=object),\n",
       " 759110: array([None], dtype=object),\n",
       " 327708: array([None], dtype=object),\n",
       " 129695: array([1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1344791: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1096813: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 848341: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1068843: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 419912: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 823586: array([1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 296386: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1161945: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 200400: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1195373: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 973391: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 65575: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 837576: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 298119: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1358198: array([1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 375546: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 544646: array([0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 607849: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 354025: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1331521: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1191566: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 199629: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 1236008: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 214542: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 350622: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 190614: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 964475: array([1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 45704: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 878391: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1105526: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 164445: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 488255: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 143944: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 802240: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1314381: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 863520: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 322780: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1115620: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1004240: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 91631: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1306292: array([0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 305295: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 46877: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1366339: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1055951: array([1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1186938: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 253904: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 78349: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1260188: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1016609: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 993751: array([1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 826191: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1042464: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 600907: array([1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 75238: array([1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 600462: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 43426: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1016709: array([1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1076150: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 861690: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1346568: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 461873: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1102232: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1056760: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1360047: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 548821: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 525224: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 626427: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 354599: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 892684: array([1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 294385: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 488384: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1127998: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 171819: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1197226: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 66852: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1111524: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1103093: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 166587: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1090147: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 401543: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 979232: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1079600: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 231285: array([1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 909695: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 259356: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 482351: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 45605: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1308171: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 307872: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 308051: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 491446: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 550643: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 347099: array([1, 1, 0, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 647478: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1351534: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 367241: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 578309: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 410784: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 374871: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 820690: array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 80545: array([1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 482040: array([0, 0, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 660628: array([1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 657616: array([0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 406622: array([0, 0, 0, 0, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 46519: array([0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 440020: array([0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 838388: array([1, 1, 1, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 372368: array([0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1028559: array([1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1014699: array([1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 311119: array([0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 540632: array([1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1174064: array([1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1288325: array([1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 574156: array([1, 1, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 277490: array([0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1359548: array([1, 1, 1, 1, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 853695: array([1, 1, 1, 1, 1, 1, 1, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 53864: array([1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 158030: array([0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 497272: array([1, 1, 0, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 699878: array([1, 1, 1, 1, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 908320: array([1, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 747066: array([1, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 294696: array([1, 1, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 307612: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1046782: array([0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 47841: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 738018: array([1, 1, 1, 1, 1, 1, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 241058: array([0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1014282: array([0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1293090: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1180298: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 436733: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 547218: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 380844: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1266749: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 130330: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1277184: array([0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 726068: array([0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 801739: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1171263: array([1, 1, 1, 0, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 427082: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 856947: array([1, 1, 1, 1, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1083614: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1043223: array([1, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 772432: array([0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1100998: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 635545: array([1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 263338: array([1, 1, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1010055: array([1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 452297: array([0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 849233: array([0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1232419: array([1, 1, 0, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 149945: array([0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 625544: array([0, 0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1248579: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 539818: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1071059: array([0, 0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1348111: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 696972: array([1, 1, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 941328: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 676679: array([0, 0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1219114: array([0, 0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 292238: array([0, 0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 771775: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1228553: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 614233: array([0, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 95904: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 270665: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 109064: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1094001: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 828445: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 990078: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 707687: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 311009: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 361304: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 18169: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 109313: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 184915: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1138461: array([1, 1, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 787356: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 252311: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 57795: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 516178: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 405637: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1363368: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1196704: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 68485: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 322656: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 977835: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1277123: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 424062: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 250174: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1023526: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 449597: array([1, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 384182: array([1, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 50084: array([1, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 118144: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1254191: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 348563: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1282349: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 179263: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1095381: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 911986: array([1, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1201628: array([0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1323759: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 281753: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1246728: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1280301: array([0, None, None, None, None, None, None, None], dtype=object),\n",
       " 403903: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 456923: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1165819: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 452121: array([0, None, None, None, None, None, None, None], dtype=object),\n",
       " 356773: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1362089: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 767634: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 254346: array([0, None, None, None, None, None, None, None], dtype=object),\n",
       " 479405: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 44820: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 213980: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 502744: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 134649: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 146827: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 1026933: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 466945: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 910932: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 971619: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 621028: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 991248: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 60028: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 437170: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 421320: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 69464: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 676314: array([None, None, None, None, None, None], dtype=object),\n",
       " 254269: array([None, None, None, None, None, None], dtype=object),\n",
       " 803095: array([None, None, None, None, None, None], dtype=object),\n",
       " 379784: array([None, None, None, None, None, None], dtype=object),\n",
       " 810769: array([None, None, None, None, None, None], dtype=object),\n",
       " 115700: array([None, None, None, None, None, None], dtype=object),\n",
       " 282099: array([None, None, None, None, None, None], dtype=object),\n",
       " 935412: array([None, None, None, None, None, None], dtype=object),\n",
       " 888078: array([None, None, None, None, None, None], dtype=object),\n",
       " 1161970: array([None, None, None, None, None, None], dtype=object),\n",
       " 254443: array([None, None, None, None, None, None], dtype=object),\n",
       " 820184: array([None, None, None, None, None, None], dtype=object),\n",
       " 52445: array([None, None, None, None, None, None], dtype=object),\n",
       " 739438: array([None, None, None, None, None], dtype=object),\n",
       " 258311: array([None, None, None, None, None], dtype=object),\n",
       " 399174: array([None, None, None, None, None], dtype=object),\n",
       " 776599: array([None, None, None, None, None], dtype=object),\n",
       " 818384: array([None, None, None, None, None], dtype=object),\n",
       " 1365488: array([None, None, None, None, None], dtype=object),\n",
       " 124486: array([None, None, None, None, None], dtype=object),\n",
       " 464769: array([None, None, None, None, None], dtype=object),\n",
       " 374698: array([None, None, None, None, None], dtype=object),\n",
       " 863663: array([None, None, None, None], dtype=object),\n",
       " 997843: array([None, None, None, None], dtype=object),\n",
       " 1060779: array([None, None, None, None], dtype=object),\n",
       " 298288: array([None, None, None, None], dtype=object),\n",
       " 538392: array([None, None, None, None], dtype=object),\n",
       " 478546: array([None, None, None, None], dtype=object),\n",
       " 934317: array([None, None, None, None], dtype=object),\n",
       " 1037223: array([None, None, None, None], dtype=object),\n",
       " 75456: array([None, None, None, None], dtype=object),\n",
       " 49913: array([None, None, None, None], dtype=object),\n",
       " 180441: array([None, None, None, None], dtype=object),\n",
       " 915432: array([None, None, None, None], dtype=object),\n",
       " 265620: array([None, None, None, None], dtype=object),\n",
       " 1292525: array([None, None, None, None], dtype=object),\n",
       " 314899: array([None, None, None, None], dtype=object),\n",
       " 472147: array([None, None, None, None], dtype=object),\n",
       " 871404: array([None, None, None], dtype=object),\n",
       " 1011297: array([None, None, None], dtype=object),\n",
       " 711978: array([None, None, None], dtype=object),\n",
       " 142200: array([None, None, None], dtype=object),\n",
       " 744880: array([None, None, None], dtype=object),\n",
       " 1196482: array([None, None, None], dtype=object),\n",
       " 613158: array([None, None, None], dtype=object),\n",
       " 385230: array([None, None, None], dtype=object),\n",
       " 757343: array([None, None, None], dtype=object),\n",
       " 718863: array([None, None, None], dtype=object),\n",
       " 1306243: array([None, None, None], dtype=object),\n",
       " 494108: array([None, None, None], dtype=object),\n",
       " 292670: array([None, None, None], dtype=object),\n",
       " 810664: array([None, None, None], dtype=object),\n",
       " 145531: array([None, None], dtype=object),\n",
       " 1204979: array([None, None], dtype=object),\n",
       " 1007878: array([None, None], dtype=object),\n",
       " 429640: array([None, None], dtype=object),\n",
       " 408945: array([None, None], dtype=object),\n",
       " 1102438: array([None], dtype=object),\n",
       " 466836: array([None], dtype=object),\n",
       " 496107: array([None], dtype=object),\n",
       " 1222898: array([None], dtype=object),\n",
       " 166312: array([None], dtype=object),\n",
       " 421532: array([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1246316: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1136225: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 54409: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1355576: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1210417: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1306727: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 74795: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 277129: array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 566363: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 938471: array([0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 854397: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 916651: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 563921: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 834452: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 73231: array([1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 271320: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 669733: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1233955: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 344986: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 938665: array([1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1236803: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1351499: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 637808: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 293848: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 513125: array([1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 691108: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 160727: array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 596133: array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 739435: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 896365: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 637043: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 1073967: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 147719: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 1185725: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 96837: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 936980: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 504530: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1321156: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1266591: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 439287: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1118764: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 93998: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 970095: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 371858: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1066803: array([1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1216582: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1178385: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 402989: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 355400: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 871022: array([0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 243472: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1230981: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1238233: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 791615: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 182433: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 217197: array([1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1008941: array([1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 993515: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 799592: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 754235: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 337538: array([0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 602426: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 175900: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 320121: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1366497: array([0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 543569: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 904710: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 203323: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 320114: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1191863: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 748064: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 701132: array([0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 483305: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1258028: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 139133: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 550148: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 189467: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 903667: array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1292561: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 170749: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 728794: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 469140: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1096939: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 326478: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 835126: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 820632: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 646235: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 263285: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1144331: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 453242: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 99881: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 917900: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 146933: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1008924: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 366221: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 26106: array([1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 783466: array([1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 720247: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1009437: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 126280: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 548663: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 285799: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1146343: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 322359: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 379945: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 287052: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 738596: array([0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 171433: array([1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 506097: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 318129: array([1, 1, 1, 0, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 794962: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 899174: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 584395: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1225499: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 819009: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 819371: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 607333: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 169942: array([1, 1, 1, 1, 1, 0, 0, 0, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 118708: array([1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 841440: array([1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 746589: array([1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1266013: array([1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 238690: array([1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 558047: array([1, 1, 1, 1, 1, 1, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 32126: array([0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 950570: array([0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 744971: array([1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1294524: array([1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1273091: array([1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1261332: array([1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 358867: array([0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1262509: array([1, 1, 1, 1, 1, 1, 1, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 838473: array([1, 1, 0, 0, 0, 0, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1252224: array([0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 462174: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 5056: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 51910: array([0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 965592: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1018683: array([1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1161820: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 354821: array([1, 1, 1, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 759052: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 194275: array([1, 1, 1, 1, 0, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 734052: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1282607: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 731186: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 180069: array([0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1612: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 538044: array([0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 990035: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1361368: array([0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1350457: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 821746: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1229775: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 476429: array([0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1240125: array([0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 148191: array([1, 1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 696436: array([1, 1, 1, 1, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 624782: array([0, 0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 794136: array([1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 670956: array([0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 875266: array([1, 1, 1, 1, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 455070: array([1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1024564: array([0, 0, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 739124: array([1, 1, 1, 1, 1, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1015886: array([1, 1, 0, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 100432: array([1, 1, 1, 0, 0, None, None, None, None, None, None, None],\n",
       "       dtype=object),\n",
       " 1073521: array([0, 0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 285446: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 976386: array([0, 0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1123452: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 329870: array([1, 1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 935560: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 401245: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 646421: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1309442: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1171857: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 777171: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1081214: array([1, 1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 929657: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 928415: array([0, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 467108: array([1, 0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 889728: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1365989: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1253679: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 684069: array([1, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 291697: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 216546: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 654073: array([1, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1080425: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 340634: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1034050: array([0, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1206065: array([1, 1, None, None, None, None, None, None, None], dtype=object),\n",
       " 715325: array([1, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 803748: array([1, 0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1095295: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1171136: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1294875: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 980295: array([0, None, None, None, None, None, None, None], dtype=object),\n",
       " 750139: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 68475: array([0, None, None, None, None, None, None, None], dtype=object),\n",
       " 222996: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 258831: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1117558: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 953680: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 356930: array([0, None, None, None, None, None, None, None], dtype=object),\n",
       " 719748: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 678792: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 37907: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 862097: array([0, None, None, None, None, None, None, None], dtype=object),\n",
       " 125349: array([1, None, None, None, None, None, None, None], dtype=object),\n",
       " 1048727: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 590118: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 311082: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 328673: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 169455: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 708695: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 89810: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 1086097: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 119421: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 1126462: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 910723: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 717448: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 776280: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 1095113: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 375128: array([None, None, None, None, None, None, None], dtype=object),\n",
       " 1331639: array([None, None, None, None, None, None], dtype=object),\n",
       " 1312462: array([None, None, None, None, None, None], dtype=object),\n",
       " 277225: array([None, None, None, None, None, None], dtype=object),\n",
       " 746631: array([None, None, None, None, None, None], dtype=object),\n",
       " 419675: array([None, None, None, None, None, None], dtype=object),\n",
       " 426036: array([None, None, None, None, None, None], dtype=object),\n",
       " 23027: array([None, None, None, None, None], dtype=object),\n",
       " 1305495: array([None, None, None, None, None], dtype=object),\n",
       " 688262: array([None, None, None, None, None], dtype=object),\n",
       " 1163490: array([None, None, None, None, None], dtype=object),\n",
       " 1024243: array([None, None, None, None, None], dtype=object),\n",
       " 958485: array([None, None, None, None, None], dtype=object),\n",
       " 130605: array([None, None, None, None], dtype=object),\n",
       " 340616: array([None, None, None, None], dtype=object),\n",
       " 670827: array([None, None, None, None], dtype=object),\n",
       " 1140404: array([None, None, None, None], dtype=object),\n",
       " 324234: array([None, None, None, None], dtype=object),\n",
       " 420165: array([None, None, None, None], dtype=object),\n",
       " 1331533: array([None, None, None, None], dtype=object),\n",
       " 1300003: array([None, None, None, None], dtype=object),\n",
       " 482733: array([None, None, None, None], dtype=object),\n",
       " 952712: array([None, None, None, None], dtype=object),\n",
       " 994435: array([None, None, None, None], dtype=object),\n",
       " 212349: array([None, None, None, None], dtype=object),\n",
       " 1349346: array([None, None, None, None], dtype=object),\n",
       " 867882: array([None, None, None, None], dtype=object),\n",
       " 425668: array([None, None, None, None], dtype=object),\n",
       " 603789: array([None, None, None, None], dtype=object),\n",
       " 1036164: array([None, None, None, None], dtype=object),\n",
       " 1045485: array([None, None, None], dtype=object),\n",
       " 1215537: array([None, None, None], dtype=object),\n",
       " 1074206: array([None, None, None], dtype=object),\n",
       " 51558: array([None, None, None], dtype=object),\n",
       " 206513: array([None, None, None], dtype=object),\n",
       " 1097462: array([None, None, None], dtype=object),\n",
       " 740763: array([None, None, None], dtype=object),\n",
       " 254971: array([None, None, None], dtype=object),\n",
       " 817716: array([None, None, None], dtype=object),\n",
       " 520613: array([None, None], dtype=object),\n",
       " 637590: array([None, None], dtype=object),\n",
       " 160775: array([None, None], dtype=object),\n",
       " 155381: array([None, None], dtype=object),\n",
       " 236360: array([None], dtype=object),\n",
       " 473209: array([None], dtype=object),\n",
       " 91356: array([None], dtype=object),\n",
       " 393059: array([None], dtype=object),\n",
       " 439146: array([None], dtype=object),\n",
       " 956525: array([None], dtype=object),\n",
       " 49020: array([None], dtype=object),\n",
       " 1306827: array([None], dtype=object),\n",
       " 1198470: array([None], dtype=object),\n",
       " 857247: array([None], dtype=object),\n",
       " 316571: array([None], dtype=object),\n",
       " 548906: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 102795: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 595835: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 1091799: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 394049: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 773358: array([1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1,\n",
       "        1, None, None, None, None, None, None, None], dtype=object),\n",
       " 318109: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        0, None, None, None, None, None, None, None], dtype=object),\n",
       " 291352: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1178849: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 651257: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 445835: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1144351: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 773513: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 485725: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1011726: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1209968: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 435886: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 465038: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 627033: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,\n",
       "        None, None, None, None, None, None, None], dtype=object),\n",
       " 1247690: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 763791: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 184855: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 895542: array([1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 1006389: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 265351: array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 402729: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 23259: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 81997: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 165142: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 688755: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 476719: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 926677: array([1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 318136: array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 484341: array([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 795340: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 588192: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 1332698: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 530363: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 1150284: array([1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 1298178: array([1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, None,\n",
       "        None, None, None, None, None, None], dtype=object),\n",
       " 1166570: array([1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 840265: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1336125: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 663133: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 914208: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 643951: array([1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 624118: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 493038: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 7746: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 946860: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 446560: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1279469: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 928783: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 471519: array([1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1204978: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1215838: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 1150480: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 884245: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 798951: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 801040: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 711794: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 494610: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None,\n",
       "        None, None, None, None, None], dtype=object),\n",
       " 210948: array([1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1150289: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 758161: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 136101: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1263601: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1281769: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 842085: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 740431: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 380179: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 796523: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 894761: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 96724: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1343616: array([1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 88701: array([0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 705708: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 811533: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1191205: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 3688: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 955495: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 78691: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1138742: array([0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 836024: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 309602: array([1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 8766: array([1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 1086210: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 490240: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 459936: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None,\n",
       "        None, None, None, None], dtype=object),\n",
       " 56949: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 319655: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 277518: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 732418: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 633415: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1032836: array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1129480: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 215150: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1030103: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 10281: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 1254525: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 869277: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 746569: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 67119: array([1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, None, None, None, None,\n",
       "        None, None, None], dtype=object),\n",
       " 973428: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 786824: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1111731: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1202073: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 605164: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 581368: array([1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1300636: array([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 1035207: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 844492: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 19167: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 803970: array([0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 573512: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 868765: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 433408: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 772261: array([1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 484035: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 593613: array([1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, None, None, None, None, None,\n",
       "        None, None], dtype=object),\n",
       " 675854: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 860938: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1080025: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1227975: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1217923: array([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 781337: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 766355: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1011370: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1043386: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1314034: array([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1359018: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 337372: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 967286: array([1, 1, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 381644: array([1, 1, 0, 0, 0, 0, 0, 1, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1167296: array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 1318762: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 359954: array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 686230: array([1, 1, 1, 1, 1, 0, 0, 1, 1, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " 480465: array([1, 0, 0, 0, 0, 0, 0, 0, 0, None, None, None, None, None, None,\n",
       "        None], dtype=object),\n",
       " ...}"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "label = {user_id:user.get_label() for user_id, user in data.items()}\n",
    "label"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "最后，把每一个用户对应的矩阵拿出来放入data， 特征制作完毕"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T00:41:40.109936Z",
     "start_time": "2020-03-06T00:41:40.075982Z"
    }
   },
   "outputs": [],
   "source": [
    "data = {user_id: user.get_array() for user_id, user in data.items()}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T01:13:06.727222Z",
     "start_time": "2020-03-06T01:13:06.723225Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(30, 15)"
      ]
     },
     "execution_count": 37,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data[744025].shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 建立模型并且训练\n",
    "通过上面的方式，我们已经把数据特征和标签都已经制作完毕，接下来就是建立RNN模型进行训练了，这里使用tensorflow来建立模型。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 合并上述的提取方法，通过数据生成器进行获得"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T03:06:30.696837Z",
     "start_time": "2020-03-06T03:05:36.788162Z"
    }
   },
   "outputs": [],
   "source": [
    "register=pd.read_csv('user_register_log.txt',sep='\\t',names=['user_id','register_day','register_type','device_type'])\n",
    "launch=pd.read_csv('app_launch_log.txt',sep='\\t',names=['user_id','launch_day'])\n",
    "create=pd.read_csv('video_create_log.txt',sep='\\t',names=['user_id','create_day'])\n",
    "activity=pd.read_csv('user_activity_log.txt',sep='\\t',names=['user_id','act_day','page','video_id','author_id','act_type'])\n",
    "\n",
    "data_generator=DataGenerator(register,launch,create,activity)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 构建RNN网络模型并进行训练"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T03:07:26.547997Z",
     "start_time": "2020-03-06T03:07:26.362493Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "WARNING:tensorflow:From C:\\Users\\ZhongqiangWu\\Anaconda3\\envs\\tfenv\\lib\\site-packages\\tensorflow\\python\\framework\\op_def_library.py:263: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Colocations handled automatically by placer.\n",
      "WARNING:tensorflow:From <ipython-input-4-29e1f57edea9>:21: GRUCell.__init__ (from tensorflow.python.ops.rnn_cell_impl) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "This class is equivalent as tf.keras.layers.GRUCell, and will be replaced by that in Tensorflow 2.0.\n",
      "WARNING:tensorflow:From <ipython-input-4-29e1f57edea9>:23: dynamic_rnn (from tensorflow.python.ops.rnn) is deprecated and will be removed in a future version.\n",
      "Instructions for updating:\n",
      "Please use `keras.layers.RNN(cell)`, which is equivalent to this API\n"
     ]
    }
   ],
   "source": [
    "n_features = 12\n",
    "n_hu = 8\n",
    "with tf.variable_scope('train'):     # tf.variable_scope用来指定变量的作用域\n",
    "    \n",
    "    # 变量与输入\n",
    "    lr = tf.placeholder(tf.float32, [], name='learning_rate')    # 定义学习率\n",
    "    \n",
    "    # 隐藏层到输出层的参数w, b    w_shape(n_hu,1)   b_shape(1)  n_huWie隐藏单元的个数\n",
    "    W_out = tf.get_variable('W_out', [n_hu, 1])   \n",
    "    b_out = tf.get_variable('b_out', [1])\n",
    "    \n",
    "    # x和y  x_shape(batch_size, seq_length, n_features)\n",
    "    x = tf.placeholder(tf.float32, [None, None, n_features])\n",
    "    y = tf.placeholder(tf.float32, [None, None])\n",
    "    \n",
    "    # batch_size和seq_length的大小\n",
    "    batch_size = tf.shape(x)[0]\n",
    "    seq_length = tf.shape(x)[1]\n",
    "    \n",
    "    # RNN 层\n",
    "    cell = tf.nn.rnn_cell.GRUCell(n_hu)     # n_hu表示每个GRUcell里面的单元个数\n",
    "    initial_state = cell.zero_state(batch_size, dtype=tf.float32)   # 指定初识状态，因为之前没有训练过\n",
    "    outputs, state = tf.nn.dynamic_rnn(cell, x, initial_state=initial_state)  # 使用的动态Rnn\n",
    "    # outputs(batch_size, max_seq_length, n_hu)     这是所有时间步的输出\n",
    "    # state (batch_size, n_hu)   这是最后一个时间步的输出\n",
    "    # 具体：https://blog.csdn.net/u010960155/article/details/81707498\n",
    "    \n",
    "    # 输出层\n",
    "    outputs = tf.reshape(outputs, [-1, n_hu])    # （batch_size*max_seq_length, n_hu）\n",
    "    logits = tf.matmul(outputs, W_out) + b_out    # (batch_size*max_seq_length)\n",
    "    logits = tf.reshape(logits, tf.stack([batch_size, seq_length]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T03:39:10.001797Z",
     "start_time": "2020-03-06T03:39:09.988791Z"
    }
   },
   "outputs": [],
   "source": [
    "# 选择部分预测结果与标签当做训练损失计算\n",
    "logits_local_train = logits[:, :-14] # 这里-14或者是更小，因为本地训练，我们用前16天训练，16-23天测试。\n",
    "label_local_train = y[:, :-14]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T03:39:18.478472Z",
     "start_time": "2020-03-06T03:39:18.018940Z"
    }
   },
   "outputs": [],
   "source": [
    "# 设置损失函数\n",
    "\n",
    "# 正则化项\n",
    "regularizer = tf.contrib.layers.l2_regularizer(0.00001)\n",
    "penalty = tf.contrib.layers.apply_regularization(regularizer, tf.trainable_variables())\n",
    "\n",
    "obj_local = tf.losses.sigmoid_cross_entropy(label_local_train, logits_local_train) + penalty\n",
    "optimizer = tf.train.AdamOptimizer(lr)\n",
    "set_local = optimizer.minimize(obj_local)\n",
    "\n",
    "# 选择部分预测结果与标签当做测试损失计算\n",
    "logits_local_test = logits[:, -8]\n",
    "label_local_test = y[:, -8]   #  这里也可以选择其他的天"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T03:39:20.305507Z",
     "start_time": "2020-03-06T03:39:20.298524Z"
    }
   },
   "outputs": [],
   "source": [
    "def train(n_obs=1000, step=1000, lr_feed=0.01):\n",
    "    #date_seq = [31] + list(range(2, 16)) + [16] * 15\n",
    "    variables = [set_local, obj_local, label_local_train, logits_local_train]\n",
    "    \n",
    "    for i in range(step):\n",
    "        length, id_list, data_x, data_y = data_generator.next_batch(n_obs)\n",
    "        _, los, lab, log = sess.run(variables, \n",
    "                                   feed_dict={x:data_x, y:data_y, lr:lr_feed})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "这里这个取数据的思路得说一下： 也就是next_batch操作\n",
    "这里取数据的时候，这个序列长度并不是随机取的。 如果看next_batch函数的时候就会注意到， 首先是先有了local_random_list， 然后从这里面取序列的长度， 那么这个local_random_list做了个什么事情呢？  他不是1-30的序列长度随机选，因为不同序列长度的用户个数不一样，而大部分应该集中在15天及以后，1-14天的那种用户可能很少，这样就有可能不够一个batch_size。 所以尽量的选15天以后的，这个local_random_list里面的元素就是从15开始，然后越往后的元素个数越多，那么相应被选择的几率就越大。 这样无非就是选择序列的时候，对应的用户让他多一些，这样好取够batch_size。<br><br>\n",
    "然后有了这个序列长度，我们就可以取相应的用户了，pointer指针就是为了从头开始选择用户数据，够一个batch_size为止，如果超了用户数目的长度，就回到头上，然后打乱用户数据，再取。 （这里建议看一下代码，只描述可能不知道咋回事， 在deep.tools.py）  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T03:39:26.997719Z",
     "start_time": "2020-03-06T03:39:26.868064Z"
    }
   },
   "outputs": [],
   "source": [
    "sess = tf.Session()\n",
    "sess.run(tf.global_variables_initializer())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T03:40:06.475972Z",
     "start_time": "2020-03-06T03:39:27.948176Z"
    }
   },
   "outputs": [],
   "source": [
    "train(n_obs=1000, step=2000, lr_feed=0.01)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 模型测试并输出结果\n",
    "f1值进行评估<br>\n",
    "![](img/5.png)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T03:40:17.683718Z",
     "start_time": "2020-03-06T03:40:17.674743Z"
    }
   },
   "outputs": [],
   "source": [
    "def test():\n",
    "    n_NA = 14     # 本地训练， 我们是1-16天训练，16-23天预测，所以这个地方最大是30-14\n",
    "    # 优化目标和数据\n",
    "    variables_1 = [obj_local, logits_local_train, label_local_train]\n",
    "    variables_2 = [logits_local_test, label_local_test]\n",
    "    \n",
    "    obs_count, cum_loss, correct = 0, 0, 0\n",
    "    user, prob, real = [], [], []\n",
    "    \n",
    "    # 训练损失\n",
    "    for length, id_list, data_x, data_y in zip(*data_generator.get_set('train')):\n",
    "        _obj, _logits_train, _label_train = sess.run(variables_1,\n",
    "                                                    feed_dict={x:data_x, y:data_y, lr:0.001})\n",
    "        obs_count += (length - n_NA) * len(id_list)\n",
    "        cum_loss += _obj * (length - n_NA) * len(id_list)\n",
    "        correct += np.sum((1 * (_logits_train>0) == _label_train))\n",
    "    \n",
    "    # 测试损失\n",
    "    for length, id_list, data_x, data_y in zip(*data_generator.get_set('test')):\n",
    "        _ = sess.run(variables_2, feed_dict={x:data_x, y:data_y, lr:0.001})\n",
    "        _logits_test, _label_test = _\n",
    "        real += list(_label_test)\n",
    "        \n",
    "        user += list(id_list)\n",
    "        prob += list(1 / (1+np.exp(-_logits_test.reshape([-1]))))\n",
    "    \n",
    "    # 打印训练损失\n",
    "    print('train_loss', cum_loss/obs_count)\n",
    "    \n",
    "    # 测试损失\n",
    "    result = pd.DataFrame({'user_id':user, 'prob':prob, 'label':real})\n",
    "    print('test_score:', f(result))\n",
    "    \n",
    "    return result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T03:40:20.182200Z",
     "start_time": "2020-03-06T03:40:19.314801Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train_loss 0.42956960269747707\n",
      "test_score: [0.8053140974078207, 0.8054470655626724, 0.8050643507376791, 0.8053365676167374, 0.8047954268776796, 0.8040700300204564]\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>user_id</th>\n",
       "      <th>prob</th>\n",
       "      <th>label</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1274576</td>\n",
       "      <td>0.857779</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>109973</td>\n",
       "      <td>0.815846</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>134299</td>\n",
       "      <td>0.815846</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1005835</td>\n",
       "      <td>0.595065</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>864582</td>\n",
       "      <td>0.820167</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1293122</td>\n",
       "      <td>0.339015</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>896835</td>\n",
       "      <td>0.753712</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>630631</td>\n",
       "      <td>0.870561</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1121791</td>\n",
       "      <td>0.753712</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1038314</td>\n",
       "      <td>0.725725</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>1201628</td>\n",
       "      <td>0.339015</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>1323759</td>\n",
       "      <td>0.815846</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>281753</td>\n",
       "      <td>0.815846</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>1246728</td>\n",
       "      <td>0.780741</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>1280301</td>\n",
       "      <td>0.594126</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>403903</td>\n",
       "      <td>0.861102</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>456923</td>\n",
       "      <td>0.780741</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>1165819</td>\n",
       "      <td>0.594126</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>452121</td>\n",
       "      <td>0.339015</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>356773</td>\n",
       "      <td>0.815846</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>1362089</td>\n",
       "      <td>0.339015</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>767634</td>\n",
       "      <td>0.815846</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>254346</td>\n",
       "      <td>0.339015</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>1095295</td>\n",
       "      <td>0.861102</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>1171136</td>\n",
       "      <td>0.725725</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>1294875</td>\n",
       "      <td>0.476942</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>980295</td>\n",
       "      <td>0.339015</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>750139</td>\n",
       "      <td>0.870561</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>68475</td>\n",
       "      <td>0.815846</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>222996</td>\n",
       "      <td>0.720917</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37416</th>\n",
       "      <td>152532</td>\n",
       "      <td>0.052708</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37417</th>\n",
       "      <td>756057</td>\n",
       "      <td>0.426611</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37418</th>\n",
       "      <td>1346518</td>\n",
       "      <td>0.993903</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37419</th>\n",
       "      <td>59116</td>\n",
       "      <td>0.883602</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37420</th>\n",
       "      <td>1293977</td>\n",
       "      <td>0.650630</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37421</th>\n",
       "      <td>530392</td>\n",
       "      <td>0.196013</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37422</th>\n",
       "      <td>1005611</td>\n",
       "      <td>0.119434</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37423</th>\n",
       "      <td>782747</td>\n",
       "      <td>0.048696</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37424</th>\n",
       "      <td>13914</td>\n",
       "      <td>0.048696</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37425</th>\n",
       "      <td>355141</td>\n",
       "      <td>0.369041</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37426</th>\n",
       "      <td>255441</td>\n",
       "      <td>0.048696</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37427</th>\n",
       "      <td>34878</td>\n",
       "      <td>0.052708</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37428</th>\n",
       "      <td>2180</td>\n",
       "      <td>0.985193</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37429</th>\n",
       "      <td>895107</td>\n",
       "      <td>0.991784</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37430</th>\n",
       "      <td>220625</td>\n",
       "      <td>0.044650</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37431</th>\n",
       "      <td>1156842</td>\n",
       "      <td>0.035504</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37432</th>\n",
       "      <td>926700</td>\n",
       "      <td>0.035504</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37433</th>\n",
       "      <td>183482</td>\n",
       "      <td>0.350676</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37434</th>\n",
       "      <td>295353</td>\n",
       "      <td>0.147742</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37435</th>\n",
       "      <td>1268644</td>\n",
       "      <td>0.988134</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37436</th>\n",
       "      <td>1162278</td>\n",
       "      <td>0.537572</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37437</th>\n",
       "      <td>385851</td>\n",
       "      <td>0.048316</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37438</th>\n",
       "      <td>801029</td>\n",
       "      <td>0.048696</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37439</th>\n",
       "      <td>173089</td>\n",
       "      <td>0.995543</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37440</th>\n",
       "      <td>84785</td>\n",
       "      <td>0.044650</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37441</th>\n",
       "      <td>801166</td>\n",
       "      <td>0.688787</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37442</th>\n",
       "      <td>1079522</td>\n",
       "      <td>0.995127</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37443</th>\n",
       "      <td>283730</td>\n",
       "      <td>0.324438</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37444</th>\n",
       "      <td>632063</td>\n",
       "      <td>0.941044</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37445</th>\n",
       "      <td>155347</td>\n",
       "      <td>0.048316</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>37446 rows × 3 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "       user_id      prob  label\n",
       "0      1274576  0.857779    1.0\n",
       "1       109973  0.815846    1.0\n",
       "2       134299  0.815846    0.0\n",
       "3      1005835  0.595065    1.0\n",
       "4       864582  0.820167    1.0\n",
       "5      1293122  0.339015    1.0\n",
       "6       896835  0.753712    1.0\n",
       "7       630631  0.870561    1.0\n",
       "8      1121791  0.753712    1.0\n",
       "9      1038314  0.725725    1.0\n",
       "10     1201628  0.339015    0.0\n",
       "11     1323759  0.815846    1.0\n",
       "12      281753  0.815846    1.0\n",
       "13     1246728  0.780741    1.0\n",
       "14     1280301  0.594126    0.0\n",
       "15      403903  0.861102    1.0\n",
       "16      456923  0.780741    1.0\n",
       "17     1165819  0.594126    1.0\n",
       "18      452121  0.339015    0.0\n",
       "19      356773  0.815846    1.0\n",
       "20     1362089  0.339015    1.0\n",
       "21      767634  0.815846    1.0\n",
       "22      254346  0.339015    0.0\n",
       "23     1095295  0.861102    1.0\n",
       "24     1171136  0.725725    1.0\n",
       "25     1294875  0.476942    1.0\n",
       "26      980295  0.339015    0.0\n",
       "27      750139  0.870561    1.0\n",
       "28       68475  0.815846    0.0\n",
       "29      222996  0.720917    1.0\n",
       "...        ...       ...    ...\n",
       "37416   152532  0.052708    0.0\n",
       "37417   756057  0.426611    1.0\n",
       "37418  1346518  0.993903    1.0\n",
       "37419    59116  0.883602    1.0\n",
       "37420  1293977  0.650630    1.0\n",
       "37421   530392  0.196013    0.0\n",
       "37422  1005611  0.119434    0.0\n",
       "37423   782747  0.048696    0.0\n",
       "37424    13914  0.048696    0.0\n",
       "37425   355141  0.369041    0.0\n",
       "37426   255441  0.048696    0.0\n",
       "37427    34878  0.052708    1.0\n",
       "37428     2180  0.985193    0.0\n",
       "37429   895107  0.991784    1.0\n",
       "37430   220625  0.044650    0.0\n",
       "37431  1156842  0.035504    0.0\n",
       "37432   926700  0.035504    0.0\n",
       "37433   183482  0.350676    0.0\n",
       "37434   295353  0.147742    1.0\n",
       "37435  1268644  0.988134    1.0\n",
       "37436  1162278  0.537572    0.0\n",
       "37437   385851  0.048316    0.0\n",
       "37438   801029  0.048696    0.0\n",
       "37439   173089  0.995543    1.0\n",
       "37440    84785  0.044650    0.0\n",
       "37441   801166  0.688787    1.0\n",
       "37442  1079522  0.995127    1.0\n",
       "37443   283730  0.324438    0.0\n",
       "37444   632063  0.941044    1.0\n",
       "37445   155347  0.048316    0.0\n",
       "\n",
       "[37446 rows x 3 columns]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "test()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 余弦退火 + 热重启训练思想\n",
    "越来越接近loss值的全局最小值时，学习率应该变得越来越小来使得模型尽可能接近最小值。 然后突然提高学习率，来“跳出”局部最小值并找到通向全局最小值的路径。 "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T04:46:20.850981Z",
     "start_time": "2020-03-06T04:46:20.844956Z"
    }
   },
   "outputs": [],
   "source": [
    "def cos_annealing_local(epoch=5):\n",
    "    all_result=None\n",
    "    for i in range(epoch):\n",
    "        train(step=2000,lr_feed=0.01)\n",
    "        train(step=2000,lr_feed=0.001)\n",
    "        result=test()\n",
    "        print(sess.run(penalty))\n",
    "        result.columns=['label','prob%s'%i,'user_id']\n",
    "        if i==0:\n",
    "            all_result=result\n",
    "        else:\n",
    "            all_result=pd.merge(all_result,result)\n",
    "    return all_result"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-06T04:52:11.925844Z",
     "start_time": "2020-03-06T04:46:22.619115Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "train_loss 0.4289520332444526\n",
      "test_score: [0.8051643803524481, 0.8053407190635452, 0.8052916163578141, 0.8053609664543075, 0.8051175877262833, 0.8046993632948825]\n",
      "0.0006277356\n",
      "train_loss 0.4288679725521854\n",
      "test_score: [0.8057853389521876, 0.8057455898927944, 0.8056542683408355, 0.8056776117813108, 0.8056491734874018, 0.8052826542116283]\n",
      "0.00073696766\n",
      "train_loss 0.42884548220977986\n",
      "test_score: [0.8056395288231003, 0.805784473255997, 0.8058009228740936, 0.8053310723086299, 0.8054410110855245, 0.8056010965678502]\n",
      "0.0008184217\n",
      "train_loss 0.4286306096566724\n",
      "test_score: [0.8057680836164639, 0.8055208333333332, 0.8058191349934469, 0.806068427845234, 0.8057995555085194, 0.8058112157534247]\n",
      "0.000890288\n",
      "train_loss 0.42857027057252495\n",
      "test_score: [0.8060728326091454, 0.8059306190278355, 0.8060544271037566, 0.8058558085843216, 0.8056954515491102, 0.8058762364358654]\n",
      "0.00093093584\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>label</th>\n",
       "      <th>prob0</th>\n",
       "      <th>user_id</th>\n",
       "      <th>prob1</th>\n",
       "      <th>prob2</th>\n",
       "      <th>prob3</th>\n",
       "      <th>prob4</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1274576</td>\n",
       "      <td>0.856154</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.840750</td>\n",
       "      <td>0.849629</td>\n",
       "      <td>0.849199</td>\n",
       "      <td>0.851723</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>109973</td>\n",
       "      <td>0.815051</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.805713</td>\n",
       "      <td>0.812808</td>\n",
       "      <td>0.815035</td>\n",
       "      <td>0.813512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>134299</td>\n",
       "      <td>0.815051</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.805713</td>\n",
       "      <td>0.812808</td>\n",
       "      <td>0.815035</td>\n",
       "      <td>0.813512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1005835</td>\n",
       "      <td>0.586597</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.560536</td>\n",
       "      <td>0.565540</td>\n",
       "      <td>0.566560</td>\n",
       "      <td>0.570088</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>864582</td>\n",
       "      <td>0.828008</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.821973</td>\n",
       "      <td>0.824899</td>\n",
       "      <td>0.831624</td>\n",
       "      <td>0.826582</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>1293122</td>\n",
       "      <td>0.334039</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.323247</td>\n",
       "      <td>0.324855</td>\n",
       "      <td>0.324347</td>\n",
       "      <td>0.333743</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>896835</td>\n",
       "      <td>0.759586</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.746464</td>\n",
       "      <td>0.755796</td>\n",
       "      <td>0.762776</td>\n",
       "      <td>0.764424</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>630631</td>\n",
       "      <td>0.875573</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.872625</td>\n",
       "      <td>0.876371</td>\n",
       "      <td>0.883951</td>\n",
       "      <td>0.881113</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>1121791</td>\n",
       "      <td>0.759586</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.746464</td>\n",
       "      <td>0.755796</td>\n",
       "      <td>0.762776</td>\n",
       "      <td>0.764424</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>1038314</td>\n",
       "      <td>0.719833</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.701582</td>\n",
       "      <td>0.709675</td>\n",
       "      <td>0.716737</td>\n",
       "      <td>0.718184</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>1201628</td>\n",
       "      <td>0.334039</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.323247</td>\n",
       "      <td>0.324855</td>\n",
       "      <td>0.324347</td>\n",
       "      <td>0.333743</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>1323759</td>\n",
       "      <td>0.815051</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.805713</td>\n",
       "      <td>0.812808</td>\n",
       "      <td>0.815035</td>\n",
       "      <td>0.813512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>281753</td>\n",
       "      <td>0.815051</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.805713</td>\n",
       "      <td>0.812808</td>\n",
       "      <td>0.815035</td>\n",
       "      <td>0.813512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>1246728</td>\n",
       "      <td>0.779653</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.766802</td>\n",
       "      <td>0.772253</td>\n",
       "      <td>0.769421</td>\n",
       "      <td>0.771130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>1280301</td>\n",
       "      <td>0.608566</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.597316</td>\n",
       "      <td>0.604974</td>\n",
       "      <td>0.615414</td>\n",
       "      <td>0.619901</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>403903</td>\n",
       "      <td>0.879230</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.867464</td>\n",
       "      <td>0.863347</td>\n",
       "      <td>0.866864</td>\n",
       "      <td>0.865512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>456923</td>\n",
       "      <td>0.779653</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.766802</td>\n",
       "      <td>0.772253</td>\n",
       "      <td>0.769421</td>\n",
       "      <td>0.771130</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>1165819</td>\n",
       "      <td>0.608566</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.597316</td>\n",
       "      <td>0.604974</td>\n",
       "      <td>0.615414</td>\n",
       "      <td>0.619901</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>452121</td>\n",
       "      <td>0.334039</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.323247</td>\n",
       "      <td>0.324855</td>\n",
       "      <td>0.324347</td>\n",
       "      <td>0.333743</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>356773</td>\n",
       "      <td>0.815051</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.805713</td>\n",
       "      <td>0.812808</td>\n",
       "      <td>0.815035</td>\n",
       "      <td>0.813512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>1362089</td>\n",
       "      <td>0.334039</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.323247</td>\n",
       "      <td>0.324855</td>\n",
       "      <td>0.324347</td>\n",
       "      <td>0.333743</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>767634</td>\n",
       "      <td>0.815051</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.805713</td>\n",
       "      <td>0.812808</td>\n",
       "      <td>0.815035</td>\n",
       "      <td>0.813512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>254346</td>\n",
       "      <td>0.334039</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.323247</td>\n",
       "      <td>0.324855</td>\n",
       "      <td>0.324347</td>\n",
       "      <td>0.333743</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>1095295</td>\n",
       "      <td>0.879230</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.867464</td>\n",
       "      <td>0.863347</td>\n",
       "      <td>0.866864</td>\n",
       "      <td>0.865512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>1171136</td>\n",
       "      <td>0.719833</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.701582</td>\n",
       "      <td>0.709675</td>\n",
       "      <td>0.716737</td>\n",
       "      <td>0.718184</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>1294875</td>\n",
       "      <td>0.509776</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.538221</td>\n",
       "      <td>0.548335</td>\n",
       "      <td>0.540575</td>\n",
       "      <td>0.551494</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>980295</td>\n",
       "      <td>0.334039</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.323247</td>\n",
       "      <td>0.324855</td>\n",
       "      <td>0.324347</td>\n",
       "      <td>0.333743</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>750139</td>\n",
       "      <td>0.875573</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.872625</td>\n",
       "      <td>0.876371</td>\n",
       "      <td>0.883951</td>\n",
       "      <td>0.881113</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>68475</td>\n",
       "      <td>0.815051</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.805713</td>\n",
       "      <td>0.812808</td>\n",
       "      <td>0.815035</td>\n",
       "      <td>0.813512</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>222996</td>\n",
       "      <td>0.721405</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.709471</td>\n",
       "      <td>0.716991</td>\n",
       "      <td>0.725464</td>\n",
       "      <td>0.733337</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37416</th>\n",
       "      <td>1365882</td>\n",
       "      <td>0.074349</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.081333</td>\n",
       "      <td>0.076139</td>\n",
       "      <td>0.079878</td>\n",
       "      <td>0.078736</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37417</th>\n",
       "      <td>153929</td>\n",
       "      <td>0.384163</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.404933</td>\n",
       "      <td>0.406546</td>\n",
       "      <td>0.429834</td>\n",
       "      <td>0.434140</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37418</th>\n",
       "      <td>1289965</td>\n",
       "      <td>0.085469</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.091056</td>\n",
       "      <td>0.084964</td>\n",
       "      <td>0.088504</td>\n",
       "      <td>0.089599</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37419</th>\n",
       "      <td>257018</td>\n",
       "      <td>0.806826</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.794847</td>\n",
       "      <td>0.793067</td>\n",
       "      <td>0.797988</td>\n",
       "      <td>0.806273</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37420</th>\n",
       "      <td>682300</td>\n",
       "      <td>0.251423</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.271812</td>\n",
       "      <td>0.267450</td>\n",
       "      <td>0.285337</td>\n",
       "      <td>0.285994</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37421</th>\n",
       "      <td>1352716</td>\n",
       "      <td>0.532982</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.517310</td>\n",
       "      <td>0.495953</td>\n",
       "      <td>0.501366</td>\n",
       "      <td>0.495675</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37422</th>\n",
       "      <td>312710</td>\n",
       "      <td>0.059826</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.062380</td>\n",
       "      <td>0.059203</td>\n",
       "      <td>0.062002</td>\n",
       "      <td>0.060839</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37423</th>\n",
       "      <td>242322</td>\n",
       "      <td>0.112528</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.126716</td>\n",
       "      <td>0.122175</td>\n",
       "      <td>0.130670</td>\n",
       "      <td>0.129997</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37424</th>\n",
       "      <td>238643</td>\n",
       "      <td>0.056587</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.059545</td>\n",
       "      <td>0.057826</td>\n",
       "      <td>0.061902</td>\n",
       "      <td>0.062206</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37425</th>\n",
       "      <td>1126836</td>\n",
       "      <td>0.057074</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.060631</td>\n",
       "      <td>0.059829</td>\n",
       "      <td>0.062802</td>\n",
       "      <td>0.062319</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37426</th>\n",
       "      <td>1017078</td>\n",
       "      <td>0.202663</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.223152</td>\n",
       "      <td>0.200971</td>\n",
       "      <td>0.180756</td>\n",
       "      <td>0.186007</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37427</th>\n",
       "      <td>644615</td>\n",
       "      <td>0.190682</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.200602</td>\n",
       "      <td>0.187534</td>\n",
       "      <td>0.186185</td>\n",
       "      <td>0.186193</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37428</th>\n",
       "      <td>710448</td>\n",
       "      <td>0.828474</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.828285</td>\n",
       "      <td>0.831334</td>\n",
       "      <td>0.841070</td>\n",
       "      <td>0.849227</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37429</th>\n",
       "      <td>83372</td>\n",
       "      <td>0.099061</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.113464</td>\n",
       "      <td>0.109031</td>\n",
       "      <td>0.108026</td>\n",
       "      <td>0.112161</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37430</th>\n",
       "      <td>532344</td>\n",
       "      <td>0.986800</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.985036</td>\n",
       "      <td>0.985481</td>\n",
       "      <td>0.984544</td>\n",
       "      <td>0.985095</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37431</th>\n",
       "      <td>895107</td>\n",
       "      <td>0.992130</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.992813</td>\n",
       "      <td>0.993311</td>\n",
       "      <td>0.994419</td>\n",
       "      <td>0.995025</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37432</th>\n",
       "      <td>80153</td>\n",
       "      <td>0.056587</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.059545</td>\n",
       "      <td>0.057826</td>\n",
       "      <td>0.061902</td>\n",
       "      <td>0.062206</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37433</th>\n",
       "      <td>1234134</td>\n",
       "      <td>0.038840</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.038450</td>\n",
       "      <td>0.038596</td>\n",
       "      <td>0.040934</td>\n",
       "      <td>0.040738</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37434</th>\n",
       "      <td>1033197</td>\n",
       "      <td>0.603401</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.596606</td>\n",
       "      <td>0.580291</td>\n",
       "      <td>0.590333</td>\n",
       "      <td>0.602344</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37435</th>\n",
       "      <td>1349160</td>\n",
       "      <td>0.987025</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.986273</td>\n",
       "      <td>0.987573</td>\n",
       "      <td>0.988176</td>\n",
       "      <td>0.988502</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37436</th>\n",
       "      <td>802750</td>\n",
       "      <td>0.114420</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.123679</td>\n",
       "      <td>0.122185</td>\n",
       "      <td>0.121040</td>\n",
       "      <td>0.128050</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37437</th>\n",
       "      <td>1323915</td>\n",
       "      <td>0.063303</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.066976</td>\n",
       "      <td>0.065082</td>\n",
       "      <td>0.068803</td>\n",
       "      <td>0.069432</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37438</th>\n",
       "      <td>913442</td>\n",
       "      <td>0.038840</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.038450</td>\n",
       "      <td>0.038596</td>\n",
       "      <td>0.040934</td>\n",
       "      <td>0.040738</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37439</th>\n",
       "      <td>1087584</td>\n",
       "      <td>0.160184</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.175749</td>\n",
       "      <td>0.155595</td>\n",
       "      <td>0.165223</td>\n",
       "      <td>0.154660</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37440</th>\n",
       "      <td>163202</td>\n",
       "      <td>0.055554</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.061184</td>\n",
       "      <td>0.059346</td>\n",
       "      <td>0.064086</td>\n",
       "      <td>0.064089</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37441</th>\n",
       "      <td>75693</td>\n",
       "      <td>0.435010</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.462595</td>\n",
       "      <td>0.458981</td>\n",
       "      <td>0.480595</td>\n",
       "      <td>0.499257</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37442</th>\n",
       "      <td>1076639</td>\n",
       "      <td>0.060848</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.064616</td>\n",
       "      <td>0.062157</td>\n",
       "      <td>0.064492</td>\n",
       "      <td>0.064106</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37443</th>\n",
       "      <td>233831</td>\n",
       "      <td>0.876775</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.861200</td>\n",
       "      <td>0.856344</td>\n",
       "      <td>0.862963</td>\n",
       "      <td>0.861721</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37444</th>\n",
       "      <td>919931</td>\n",
       "      <td>0.593517</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0.626643</td>\n",
       "      <td>0.635944</td>\n",
       "      <td>0.656462</td>\n",
       "      <td>0.657430</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>37445</th>\n",
       "      <td>1184768</td>\n",
       "      <td>0.870457</td>\n",
       "      <td>1.0</td>\n",
       "      <td>0.852415</td>\n",
       "      <td>0.855199</td>\n",
       "      <td>0.867142</td>\n",
       "      <td>0.861434</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>37446 rows × 7 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         label     prob0  user_id     prob1     prob2     prob3     prob4\n",
       "0      1274576  0.856154      1.0  0.840750  0.849629  0.849199  0.851723\n",
       "1       109973  0.815051      1.0  0.805713  0.812808  0.815035  0.813512\n",
       "2       134299  0.815051      0.0  0.805713  0.812808  0.815035  0.813512\n",
       "3      1005835  0.586597      1.0  0.560536  0.565540  0.566560  0.570088\n",
       "4       864582  0.828008      1.0  0.821973  0.824899  0.831624  0.826582\n",
       "5      1293122  0.334039      1.0  0.323247  0.324855  0.324347  0.333743\n",
       "6       896835  0.759586      1.0  0.746464  0.755796  0.762776  0.764424\n",
       "7       630631  0.875573      1.0  0.872625  0.876371  0.883951  0.881113\n",
       "8      1121791  0.759586      1.0  0.746464  0.755796  0.762776  0.764424\n",
       "9      1038314  0.719833      1.0  0.701582  0.709675  0.716737  0.718184\n",
       "10     1201628  0.334039      0.0  0.323247  0.324855  0.324347  0.333743\n",
       "11     1323759  0.815051      1.0  0.805713  0.812808  0.815035  0.813512\n",
       "12      281753  0.815051      1.0  0.805713  0.812808  0.815035  0.813512\n",
       "13     1246728  0.779653      1.0  0.766802  0.772253  0.769421  0.771130\n",
       "14     1280301  0.608566      0.0  0.597316  0.604974  0.615414  0.619901\n",
       "15      403903  0.879230      1.0  0.867464  0.863347  0.866864  0.865512\n",
       "16      456923  0.779653      1.0  0.766802  0.772253  0.769421  0.771130\n",
       "17     1165819  0.608566      1.0  0.597316  0.604974  0.615414  0.619901\n",
       "18      452121  0.334039      0.0  0.323247  0.324855  0.324347  0.333743\n",
       "19      356773  0.815051      1.0  0.805713  0.812808  0.815035  0.813512\n",
       "20     1362089  0.334039      1.0  0.323247  0.324855  0.324347  0.333743\n",
       "21      767634  0.815051      1.0  0.805713  0.812808  0.815035  0.813512\n",
       "22      254346  0.334039      0.0  0.323247  0.324855  0.324347  0.333743\n",
       "23     1095295  0.879230      1.0  0.867464  0.863347  0.866864  0.865512\n",
       "24     1171136  0.719833      1.0  0.701582  0.709675  0.716737  0.718184\n",
       "25     1294875  0.509776      1.0  0.538221  0.548335  0.540575  0.551494\n",
       "26      980295  0.334039      0.0  0.323247  0.324855  0.324347  0.333743\n",
       "27      750139  0.875573      1.0  0.872625  0.876371  0.883951  0.881113\n",
       "28       68475  0.815051      0.0  0.805713  0.812808  0.815035  0.813512\n",
       "29      222996  0.721405      1.0  0.709471  0.716991  0.725464  0.733337\n",
       "...        ...       ...      ...       ...       ...       ...       ...\n",
       "37416  1365882  0.074349      0.0  0.081333  0.076139  0.079878  0.078736\n",
       "37417   153929  0.384163      0.0  0.404933  0.406546  0.429834  0.434140\n",
       "37418  1289965  0.085469      0.0  0.091056  0.084964  0.088504  0.089599\n",
       "37419   257018  0.806826      1.0  0.794847  0.793067  0.797988  0.806273\n",
       "37420   682300  0.251423      0.0  0.271812  0.267450  0.285337  0.285994\n",
       "37421  1352716  0.532982      0.0  0.517310  0.495953  0.501366  0.495675\n",
       "37422   312710  0.059826      0.0  0.062380  0.059203  0.062002  0.060839\n",
       "37423   242322  0.112528      0.0  0.126716  0.122175  0.130670  0.129997\n",
       "37424   238643  0.056587      0.0  0.059545  0.057826  0.061902  0.062206\n",
       "37425  1126836  0.057074      0.0  0.060631  0.059829  0.062802  0.062319\n",
       "37426  1017078  0.202663      0.0  0.223152  0.200971  0.180756  0.186007\n",
       "37427   644615  0.190682      0.0  0.200602  0.187534  0.186185  0.186193\n",
       "37428   710448  0.828474      0.0  0.828285  0.831334  0.841070  0.849227\n",
       "37429    83372  0.099061      0.0  0.113464  0.109031  0.108026  0.112161\n",
       "37430   532344  0.986800      1.0  0.985036  0.985481  0.984544  0.985095\n",
       "37431   895107  0.992130      1.0  0.992813  0.993311  0.994419  0.995025\n",
       "37432    80153  0.056587      0.0  0.059545  0.057826  0.061902  0.062206\n",
       "37433  1234134  0.038840      0.0  0.038450  0.038596  0.040934  0.040738\n",
       "37434  1033197  0.603401      1.0  0.596606  0.580291  0.590333  0.602344\n",
       "37435  1349160  0.987025      1.0  0.986273  0.987573  0.988176  0.988502\n",
       "37436   802750  0.114420      0.0  0.123679  0.122185  0.121040  0.128050\n",
       "37437  1323915  0.063303      1.0  0.066976  0.065082  0.068803  0.069432\n",
       "37438   913442  0.038840      0.0  0.038450  0.038596  0.040934  0.040738\n",
       "37439  1087584  0.160184      1.0  0.175749  0.155595  0.165223  0.154660\n",
       "37440   163202  0.055554      0.0  0.061184  0.059346  0.064086  0.064089\n",
       "37441    75693  0.435010      0.0  0.462595  0.458981  0.480595  0.499257\n",
       "37442  1076639  0.060848      0.0  0.064616  0.062157  0.064492  0.064106\n",
       "37443   233831  0.876775      1.0  0.861200  0.856344  0.862963  0.861721\n",
       "37444   919931  0.593517      0.0  0.626643  0.635944  0.656462  0.657430\n",
       "37445  1184768  0.870457      1.0  0.852415  0.855199  0.867142  0.861434\n",
       "\n",
       "[37446 rows x 7 columns]"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cos_annealing_local()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 知识点和思路的总结\n",
    "1. pd.iterrows()函数\n",
    "2. pd.groupby()函数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### pd.iterrows()函数\n",
    "iterrows() 是在DataFrame中的行进行迭代的一个生成器，它返回每行的索引及一个包含行本身的对象。<br><br>\n",
    "所以，当我们在需要遍历行数据的时候，就可以使用 iterrows()方法实现了。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T07:45:28.938947Z",
     "start_time": "2020-03-05T07:45:28.929971Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "      <th>C</th>\n",
       "      <th>D</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-1.083707</td>\n",
       "      <td>0.856265</td>\n",
       "      <td>-0.254691</td>\n",
       "      <td>0.238692</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-0.930010</td>\n",
       "      <td>0.969821</td>\n",
       "      <td>-0.912533</td>\n",
       "      <td>1.141066</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0.132397</td>\n",
       "      <td>0.958107</td>\n",
       "      <td>0.004362</td>\n",
       "      <td>-1.627512</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          A         B         C         D\n",
       "0 -1.083707  0.856265 -0.254691  0.238692\n",
       "1 -0.930010  0.969821 -0.912533  1.141066\n",
       "2  0.132397  0.958107  0.004362 -1.627512"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame(np.random.randn(3, 4), columns=list('ABCD'))\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T07:47:46.679368Z",
     "start_time": "2020-03-05T07:47:46.673384Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "0\n",
      "-1.083706901708258\n",
      "0.23869180151476993\n",
      "0.8562654567977414\n",
      "1\n",
      "-0.930009726608264\n",
      "1.1410662746749882\n",
      "0.9698209735433845\n",
      "2\n",
      "0.1323970363518363\n",
      "-1.6275121717858587\n",
      "0.9581073260783397\n"
     ]
    }
   ],
   "source": [
    "# 遍历行\n",
    "for index, row in df.iterrows():    # index表示索引， row是一个Series结构，可以通过列名或者列索引来获取每一个元素\n",
    "    print(index)\n",
    "    print(row['A'])           # 这样是第一列的数据\n",
    "    print(row[-1])   # 最后一列的数据\n",
    "    print(row[1])    # 第二列的数据"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### pd.groupby函数\n",
    "这个函数的功能非常强大，类似于sql的groupby函数，对数据按照某一标准进行分组，然后进行一些统计。任何groupby操作都会涉及到下面的三个操作之一：\n",
    "* Splitting：分割数据\n",
    "* Applying：应用一个函数\n",
    "* Combining:合并结果\n",
    "\n",
    "在许多情况下，我们将数据分成几组，并在每个子集上应用一些功能。在应用中，我们可以执行以下操作：\n",
    "* Aggregation ：计算一些摘要统计\n",
    "* Transformation ：执行一些特定组的操作\n",
    "* Filtration：根据某些条件下丢弃数据\n",
    "\n",
    "参考博客：\n",
    "* [Pandas之groupby( )用法笔记](https://www.cnblogs.com/bjwu/p/8970818.html)\n",
    "* [Pandas分组运算（groupby）修炼](https://www.cnblogs.com/lemonbit/p/6810972.html)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:01:48.115869Z",
     "start_time": "2020-03-05T08:01:48.105895Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Team</th>\n",
       "      <th>Rank</th>\n",
       "      <th>Year</th>\n",
       "      <th>Points</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>Riders</td>\n",
       "      <td>1</td>\n",
       "      <td>2014</td>\n",
       "      <td>876</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Riders</td>\n",
       "      <td>2</td>\n",
       "      <td>2015</td>\n",
       "      <td>789</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Devils</td>\n",
       "      <td>2</td>\n",
       "      <td>2014</td>\n",
       "      <td>863</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Devils</td>\n",
       "      <td>3</td>\n",
       "      <td>2015</td>\n",
       "      <td>673</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Kings</td>\n",
       "      <td>3</td>\n",
       "      <td>2014</td>\n",
       "      <td>741</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>kings</td>\n",
       "      <td>4</td>\n",
       "      <td>2015</td>\n",
       "      <td>812</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>Kings</td>\n",
       "      <td>1</td>\n",
       "      <td>2016</td>\n",
       "      <td>756</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>Kings</td>\n",
       "      <td>1</td>\n",
       "      <td>2017</td>\n",
       "      <td>788</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>Riders</td>\n",
       "      <td>2</td>\n",
       "      <td>2016</td>\n",
       "      <td>694</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>Royals</td>\n",
       "      <td>4</td>\n",
       "      <td>2014</td>\n",
       "      <td>701</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>Royals</td>\n",
       "      <td>1</td>\n",
       "      <td>2015</td>\n",
       "      <td>804</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>Riders</td>\n",
       "      <td>2</td>\n",
       "      <td>2017</td>\n",
       "      <td>690</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "      Team  Rank  Year  Points\n",
       "0   Riders     1  2014     876\n",
       "1   Riders     2  2015     789\n",
       "2   Devils     2  2014     863\n",
       "3   Devils     3  2015     673\n",
       "4    Kings     3  2014     741\n",
       "5    kings     4  2015     812\n",
       "6    Kings     1  2016     756\n",
       "7    Kings     1  2017     788\n",
       "8   Riders     2  2016     694\n",
       "9   Royals     4  2014     701\n",
       "10  Royals     1  2015     804\n",
       "11  Riders     2  2017     690"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ipl_data = {'Team': ['Riders', 'Riders', 'Devils', 'Devils', 'Kings',\n",
    "         'kings', 'Kings', 'Kings', 'Riders', 'Royals', 'Royals', 'Riders'],\n",
    "         'Rank': [1, 2, 2, 3, 3,4 ,1 ,1,2 , 4,1,2],\n",
    "         'Year': [2014,2015,2014,2015,2014,2015,2016,2017,2016,2014,2015,2017],\n",
    "         'Points':[876,789,863,673,741,812,756,788,694,701,804,690]}\n",
    "df = pd.DataFrame(ipl_data)\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Pandas对象可以拆分为任何对象。分割对象的方法有多种：\n",
    "* obj.groupby('key')\n",
    "* obj.groupby(['key1','key2'])\n",
    "* obj.groupby(key,axis=1)\n",
    "\n",
    "现在让我们看看如何将分组对象应用于DataFrame对象\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:03:01.416423Z",
     "start_time": "2020-03-05T08:03:01.410440Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<pandas.core.groupby.generic.DataFrameGroupBy object at 0x0000021A1321B1D0>"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.groupby('Team')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 76,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:40:18.891051Z",
     "start_time": "2020-03-05T08:40:18.885070Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'Devils': Int64Index([2, 3], dtype='int64'),\n",
       " 'Kings': Int64Index([4, 6, 7], dtype='int64'),\n",
       " 'Riders': Int64Index([0, 1, 8, 11], dtype='int64'),\n",
       " 'Royals': Int64Index([9, 10], dtype='int64'),\n",
       " 'kings': Int64Index([5], dtype='int64')}"
      ]
     },
     "execution_count": 76,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 查看分组\n",
    "df.groupby('Team').groups   # 第几个是"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:05:37.987837Z",
     "start_time": "2020-03-05T08:05:37.977823Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{('Devils', 2014): Int64Index([2], dtype='int64'),\n",
       " ('Devils', 2015): Int64Index([3], dtype='int64'),\n",
       " ('Kings', 2014): Int64Index([4], dtype='int64'),\n",
       " ('Kings', 2016): Int64Index([6], dtype='int64'),\n",
       " ('Kings', 2017): Int64Index([7], dtype='int64'),\n",
       " ('Riders', 2014): Int64Index([0], dtype='int64'),\n",
       " ('Riders', 2015): Int64Index([1], dtype='int64'),\n",
       " ('Riders', 2016): Int64Index([8], dtype='int64'),\n",
       " ('Riders', 2017): Int64Index([11], dtype='int64'),\n",
       " ('Royals', 2014): Int64Index([9], dtype='int64'),\n",
       " ('Royals', 2015): Int64Index([10], dtype='int64'),\n",
       " ('kings', 2015): Int64Index([5], dtype='int64')}"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 根据多列进行分组\n",
    "df.groupby(['Team', 'Year']).groups"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:45:05.838895Z",
     "start_time": "2020-03-05T08:45:05.826928Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1,       Team  Rank  Year  Points\n",
      "0   Riders     1  2014     876\n",
      "6    Kings     1  2016     756\n",
      "7    Kings     1  2017     788\n",
      "10  Royals     1  2015     804)\n",
      "(2,       Team  Rank  Year  Points\n",
      "1   Riders     2  2015     789\n",
      "2   Devils     2  2014     863\n",
      "8   Riders     2  2016     694\n",
      "11  Riders     2  2017     690)\n",
      "(3,      Team  Rank  Year  Points\n",
      "3  Devils     3  2015     673\n",
      "4   Kings     3  2014     741)\n",
      "(4,      Team  Rank  Year  Points\n",
      "5   kings     4  2015     812\n",
      "9  Royals     4  2014     701)\n"
     ]
    }
   ],
   "source": [
    "# 遍历分组\n",
    "grouped = df.groupby('Rank', as_index=False)\n",
    "for name in grouped:\n",
    "    print(name)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### 获取某一分组  get_group方法"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:06:55.738972Z",
     "start_time": "2020-03-05T08:06:55.732987Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "     Team  Rank  Year  Points\n",
      "0  Riders     1  2014     876\n",
      "2  Devils     2  2014     863\n",
      "4   Kings     3  2014     741\n",
      "9  Royals     4  2014     701\n"
     ]
    }
   ],
   "source": [
    "# 获取某一分组\n",
    "grouped = df.groupby('Year')\n",
    "print(grouped.get_group(2014))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Aggregations（聚合）\n",
    "聚合函数返回每个组的单个聚合值。一旦创建了group by对象，就可以对分组数据执行多个聚合操作。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:45:43.968346Z",
     "start_time": "2020-03-05T08:45:43.933432Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   Year    mean        std  max\n",
      "0  2014  795.25  87.439026  876\n",
      "1  2015  769.50  65.035888  812\n",
      "2  2016  725.00  43.840620  756\n",
      "3  2017  739.00  69.296465  788\n",
      "   Year  Points       Rank\n",
      "           mean   sum amax\n",
      "0  2014  795.25  3181    4\n",
      "1  2015  769.50  3078    4\n",
      "2  2016  725.00  1450    2\n",
      "3  2017  739.00  1478    2\n",
      "0    795.25\n",
      "1    769.50\n",
      "2    725.00\n",
      "3    739.00\n",
      "dtype: float64\n",
      "     Team  Rank  Year  Points\n",
      "0  Riders     1  2014     876\n",
      "2  Devils     2  2014     863\n",
      "4   Kings     3  2014     741\n",
      "9  Royals     4  2014     701\n",
      "     Team  Rank  Year  Points\n",
      "0  Riders     1  2014     876\n",
      "2  Devils     2  2014     863\n",
      "4   Kings     3  2014     741\n",
      "9  Royals     4  2014     701\n",
      "      Team  Rank  Year  Points\n",
      "1   Riders     2  2015     789\n",
      "3   Devils     3  2015     673\n",
      "5    kings     4  2015     812\n",
      "10  Royals     1  2015     804\n",
      "     Team  Rank  Year  Points\n",
      "6   Kings     1  2016     756\n",
      "8  Riders     2  2016     694\n",
      "      Team  Rank  Year  Points\n",
      "7    Kings     1  2017     788\n",
      "11  Riders     2  2017     690\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "Empty DataFrame\n",
       "Columns: []\n",
       "Index: []"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\"\"\"agg方法实现聚合, 相比于apply，可以同时传入多个统计函数\"\"\"\n",
    "\n",
    "# 针对同一列使用不同的统计方法 \n",
    "grouped = df.groupby('Year', as_index=False)    # 这个as_index属性，如果是False，就是SQL风格的统计输出，如果是True，默认第一列变成了索引\n",
    "print(grouped['Points'].agg({'mean':np.mean, 'std':np.std, 'max':np.max}))\n",
    "\n",
    "# 针对不同的列使用不同的统计方法\n",
    "print(grouped.agg({'Points':[np.mean, 'sum'], 'Rank':[np.max]}))\n",
    "\n",
    "# 使用apply的话\n",
    "print(grouped['Points'].apply(np.mean))\n",
    "grouped.apply(lambda x: print(x))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:22:59.498205Z",
     "start_time": "2020-03-05T08:22:59.477261Z"
    },
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Team\n",
      "Devils    2\n",
      "Kings     3\n",
      "Riders    4\n",
      "Royals    2\n",
      "kings     1\n",
      "dtype: int64\n",
      "        Rank  Year  Points\n",
      "Team                      \n",
      "Devils     2     2       2\n",
      "Kings      3     3       3\n",
      "Riders     4     4       4\n",
      "Royals     2     2       2\n",
      "kings      1     1       1\n",
      "        Rank  Year  Points\n",
      "Team                      \n",
      "Devils     2     2       2\n",
      "Kings      3     3       3\n",
      "Riders     4     4       4\n",
      "Royals     2     2       2\n",
      "kings      1     1       1\n"
     ]
    }
   ],
   "source": [
    "\"\"\"查看每个组大小的另一种方法是应用size()函数\"\"\"\n",
    "\n",
    "grouped = df.groupby('Team')\n",
    "print(grouped.size())\n",
    "print(grouped.count())\n",
    "print(grouped.agg(np.size))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Transformations\n",
    "前面进行聚合运算的时候，得到的结果是一个以分组名为 index 的结果对象。如果我们想使用原数组的 index 的话，就需要进行 merge 转换。transform(func, args, *kwargs) 方法简化了这个过程，它会把 func 参数应用到所有分组，然后把结果放置到原数组的 index 上（如果结果是一个标量，就进行广播）："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:26:45.280591Z",
     "start_time": "2020-03-05T08:26:45.245683Z"
    },
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "         Rank       Year     Points\n",
      "0  -15.000000 -11.618950  12.843272\n",
      "1    5.000000  -3.872983   3.020286\n",
      "2   -7.071068  -7.071068   7.071068\n",
      "3    7.071068   7.071068  -7.071068\n",
      "4   11.547005 -10.910895  -8.608621\n",
      "5         NaN        NaN        NaN\n",
      "6   -5.773503   2.182179  -2.360428\n",
      "7   -5.773503   8.728716  10.969049\n",
      "8    5.000000   3.872983  -7.705963\n",
      "9    7.071068  -7.071068  -7.071068\n",
      "10  -7.071068   7.071068   7.071068\n",
      "11   5.000000  11.618950  -8.157595\n"
     ]
    }
   ],
   "source": [
    "grouped = df.groupby('Team')\n",
    "score = lambda x: (x - x.mean()) / x.std()*10\n",
    "print(grouped.transform(score))   # 应用于原数组的index上"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:27:37.794246Z",
     "start_time": "2020-03-05T08:27:37.772265Z"
    },
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2    2\n",
      "3    3\n",
      "Name: Rank, dtype: int64\n",
      "2    2014\n",
      "3    2015\n",
      "Name: Year, dtype: int64\n",
      "2    863\n",
      "3    673\n",
      "Name: Points, dtype: int64\n",
      "   Rank  Year  Points\n",
      "2     2  2014     863\n",
      "3     3  2015     673\n",
      "4    3\n",
      "6    1\n",
      "7    1\n",
      "Name: Rank, dtype: int64\n",
      "4    2014\n",
      "6    2016\n",
      "7    2017\n",
      "Name: Year, dtype: int64\n",
      "4    741\n",
      "6    756\n",
      "7    788\n",
      "Name: Points, dtype: int64\n",
      "0     1\n",
      "1     2\n",
      "8     2\n",
      "11    2\n",
      "Name: Rank, dtype: int64\n",
      "0     2014\n",
      "1     2015\n",
      "8     2016\n",
      "11    2017\n",
      "Name: Year, dtype: int64\n",
      "0     876\n",
      "1     789\n",
      "8     694\n",
      "11    690\n",
      "Name: Points, dtype: int64\n",
      "9     4\n",
      "10    1\n",
      "Name: Rank, dtype: int64\n",
      "9     2014\n",
      "10    2015\n",
      "Name: Year, dtype: int64\n",
      "9     701\n",
      "10    804\n",
      "Name: Points, dtype: int64\n",
      "5    4\n",
      "Name: Rank, dtype: int64\n",
      "5    2015\n",
      "Name: Year, dtype: int64\n",
      "5    812\n",
      "Name: Points, dtype: int64\n",
      "    Rank  Year Points\n",
      "0   None  None   None\n",
      "1   None  None   None\n",
      "2   None  None   None\n",
      "3   None  None   None\n",
      "4   None  None   None\n",
      "5   None  None   None\n",
      "6   None  None   None\n",
      "7   None  None   None\n",
      "8   None  None   None\n",
      "9   None  None   None\n",
      "10  None  None   None\n",
      "11  None  None   None\n"
     ]
    }
   ],
   "source": [
    "print(grouped.transform(lambda x: print(x)))    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 64,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:27:31.544011Z",
     "start_time": "2020-03-05T08:27:31.524022Z"
    },
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2    2\n",
      "3    3\n",
      "Name: Rank, dtype: int64\n",
      "4    3\n",
      "6    1\n",
      "7    1\n",
      "Name: Rank, dtype: int64\n",
      "0     1\n",
      "1     2\n",
      "8     2\n",
      "11    2\n",
      "Name: Rank, dtype: int64\n",
      "9     4\n",
      "10    1\n",
      "Name: Rank, dtype: int64\n",
      "5    4\n",
      "Name: Rank, dtype: int64\n",
      "2    2014\n",
      "3    2015\n",
      "Name: Year, dtype: int64\n",
      "4    2014\n",
      "6    2016\n",
      "7    2017\n",
      "Name: Year, dtype: int64\n",
      "0     2014\n",
      "1     2015\n",
      "8     2016\n",
      "11    2017\n",
      "Name: Year, dtype: int64\n",
      "9     2014\n",
      "10    2015\n",
      "Name: Year, dtype: int64\n",
      "5    2015\n",
      "Name: Year, dtype: int64\n",
      "2    863\n",
      "3    673\n",
      "Name: Points, dtype: int64\n",
      "4    741\n",
      "6    756\n",
      "7    788\n",
      "Name: Points, dtype: int64\n",
      "0     876\n",
      "1     789\n",
      "8     694\n",
      "11    690\n",
      "Name: Points, dtype: int64\n",
      "9     701\n",
      "10    804\n",
      "Name: Points, dtype: int64\n",
      "5    812\n",
      "Name: Points, dtype: int64\n",
      "        Rank  Year Points\n",
      "Team                     \n",
      "Devils  None  None   None\n",
      "Kings   None  None   None\n",
      "Riders  None  None   None\n",
      "Royals  None  None   None\n",
      "kings   None  None   None\n"
     ]
    }
   ],
   "source": [
    "print(grouped.agg(lambda x: print(x)))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:31:44.586750Z",
     "start_time": "2020-03-05T08:31:44.572788Z"
    },
    "collapsed": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "     Team  Rank  Year  Points\n",
      "2  Devils     2  2014     863\n",
      "3  Devils     3  2015     673\n",
      "     Team  Rank  Year  Points\n",
      "2  Devils     2  2014     863\n",
      "3  Devils     3  2015     673\n",
      "    Team  Rank  Year  Points\n",
      "4  Kings     3  2014     741\n",
      "6  Kings     1  2016     756\n",
      "7  Kings     1  2017     788\n",
      "      Team  Rank  Year  Points\n",
      "0   Riders     1  2014     876\n",
      "1   Riders     2  2015     789\n",
      "8   Riders     2  2016     694\n",
      "11  Riders     2  2017     690\n",
      "      Team  Rank  Year  Points\n",
      "9   Royals     4  2014     701\n",
      "10  Royals     1  2015     804\n",
      "    Team  Rank  Year  Points\n",
      "5  kings     4  2015     812\n",
      "Empty DataFrame\n",
      "Columns: []\n",
      "Index: []\n"
     ]
    }
   ],
   "source": [
    "print(grouped.apply(lambda x: print(x)))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:31:24.127006Z",
     "start_time": "2020-03-05T08:31:24.122971Z"
    }
   },
   "source": [
    "使用apply()处理的对象是一个个的类如DataFrame的数据表，然而agg()则每次只传入一列,从列的角度进行输出。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### Filtration\n",
    "过滤数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:35:39.337056Z",
     "start_time": "2020-03-05T08:35:39.331113Z"
    }
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Team\n",
       "Devils    2\n",
       "Kings     3\n",
       "Riders    4\n",
       "Royals    2\n",
       "kings     1\n",
       "dtype: int64"
      ]
     },
     "execution_count": 70,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "grouped.size()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 69,
   "metadata": {
    "ExecuteTime": {
     "end_time": "2020-03-05T08:34:52.229944Z",
     "start_time": "2020-03-05T08:34:52.219971Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "      Team  Rank  Year  Points\n",
      "0   Riders     1  2014     876\n",
      "1   Riders     2  2015     789\n",
      "4    Kings     3  2014     741\n",
      "6    Kings     1  2016     756\n",
      "7    Kings     1  2017     788\n",
      "8   Riders     2  2016     694\n",
      "11  Riders     2  2017     690\n"
     ]
    }
   ],
   "source": [
    "print(df.groupby('Team').filter(lambda x: len(x) >= 3))"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {
    "height": "calc(100% - 180px)",
    "left": "10px",
    "top": "150px",
    "width": "340px"
   },
   "toc_section_display": true,
   "toc_window_display": true
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
